ginatrapani/todo.txt-cli — pull request #73 by inkarkat (2012-01-26 12:09:49+00:00)
Title: Testlib enhancements

As the vast majority of tests uses the todo.sh output to verify its correctness, output differences should always be shown, not just in verbose mode. Gina, we've already discussed this some time ago (and you agreed to this change). Recently you've sent me another test output that was missing the (often helpful) output differences, and I'm annoyed by this all the time when I run the tests myself while implementing new functionality.

So, always print output differences, not just in verbose mode, and use the verbose mode to show the full todo.sh output instead.

This change removes the output redirection and check for exit code from the command-under-test, so as another benefit, these "housekeeping commands" are now kept off the test log.

Also, by using a separate function for exit code assertion, this can now report both differences in output and exit code (and not suppress the former any more.)

(Note: To see any of this, you need to temporarily introduce some test failures.)

Finally, I've added color highlighting for the aggregate test report (as in test-lib), because it didn't stood out against the colored test results, so that I often missed the crucial summary.