tests/uid.awk: rewrite in a more maintainable style

Since the test is virtually a FSM, rewrite it as a FSM.
1 file changed