Trim lines when comparing test results run from the command line.
Improve test cases.