add 'done;' statements to all test files
add missing parens

The lack of parens wasn't what was intended. It also made the code hang, for
some reason.