Closed choksi81 closed 10 years ago
Author: justinc Do you think maybe we should just check to see that every line of output is matched by some string?
How should this work?
Author: leonwlaw If I understand correctly, you want to be able to define a few expected strings, and as we check the program output, check off the expected strings one by one, until all the expected strings are accounted for? I think that could work equally as well, if not being more intuitive. I would enforce the order of occurrence for these strings just as preventive measure for potential bug masking. At one point I wrote a unit test and I expected this behavior.
Perhaps something like this, then?
#pragma out Hello world
print "Hello world"
#pragma out we need a test
#pragma out really badly
print "we need a test"
# Miscellaneous code that doesn't print stuff
print "really badly"
Author: justinc Sounds good to me. I agree it is more intuitive this way.
Author: leonwlaw These tests don't pass on either version:
These tests did not finish running in a timely manner, on both versions:
Aside from that, all other tests pass and are compatible with the new multi-line support.
Author: leonwlaw Just a note, this is fixed with r6029.
The strings that you tell UTF to check for can only be one line long. They cannot span multiple lines. For example, for the next code block, you cannot test for the entire string. You can only test for specific segments of the code, e.g. 'hello world' or 'this is a test message'. The newline character cannot be represented in the command used to indicate the test message.