Generalize command-line test output file checking