Open t-schroeder opened 5 years ago
Hello, Thanks for your sharing your issue. I think that the test program is correcto. If you want to accept only the output with newline the case definition is correct. Please, remember to state it at problem definition. If you want also accept the output whitout newline add a new output to the case definitivo. output = "Hello World! " output = "Hello World!"
I think that the real problem is that the report does not state clearly the difference found. I think that the error report must be improved to help with this problem.
Best regards, Juan Carlos
Hello Juan Carlos,
yes, that's what I meant. In the problem definition we would write something like:
Write a program that outputs "Hello World!" (without the quotes) followed by a newline.
The only problem is that the linebreak is missing in the evaluate output.
Regards Tim Schroeder
The scrollbars seems to be hiding the real content. I have tagged the issue as bug.
We have this test case:
... and this solution:
... leads to this output when evaluated:![image](https://user-images.githubusercontent.com/24255259/63511274-0ad61a00-c4e1-11e9-9bb7-087b62d53a40.png)
The problem is that it isn't obvious to the user what's wrong with his solution. When you add a
\n
to the end of the printf your solution will evaluate as correct. The reason for the empty line being skipped in the expected output is this function: https://github.com/jcrodriguez-dis/moodle-mod_vpl/blob/3842307010be49a71a934dbd772c6fe77c7a72d4/jail/default_scripts/vpl_evaluate.cpp#L368-L391I don't know if the
Tools::splitLines
function can just be changed. It is also used inEvaluation::loadTestCases
and I can't tell if it would lead to any problems there.