New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question Marks break Exact Test #117
Comments
I have not been able to reproduce this issue. Notice that your case definition does not accept anything after the "?" neither a newline.
If some output defined matches the program output, the test case is passed. |
This one works:
[cid:0dd0a328-e4a2-4888-a525-4cafd820ede1]
[cid:f2c86be4-1f3d-42c3-9937-b288b4d770e2][cid:15197f69-9cb1-48dd-90e2-ff377cfd5b35]
This one does not:
[cid:51c08b53-7b01-4551-886d-d4ea9693571b]
[cid:ffb2cbef-bca9-44a5-823b-3a530ffa5f8a][cid:97353f6f-5dbc-4240-9818-fe0c43e7bf76]
…________________________________
From: jcrodriguez-dis <notifications@github.com>
Sent: 29 October 2020 11:01
To: jcrodriguez-dis/moodle-mod_vpl <moodle-mod_vpl@noreply.github.com>
Cc: Stephen Parry <sparry@chapeltownacademy.com>; Author <author@noreply.github.com>
Subject: Re: [jcrodriguez-dis/moodle-mod_vpl] Question Marks break Exact Test (#117)
I have not been able to reproduce this issue.
Please, show your vpl_evaluate.cases file and the student's program that does not pass the test.
Notice that your case definition does not accept anything after the "?" neither a newline.
To define a case that accepts exact outputs with and without a newline, you can use two outputs in this test case
output="ABC?"
output="ABC?
"
If some output defined matches the program output, the test case is passed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#117 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQCFKOZR7F5EUYG3WI4VNZ3SNFDQPANCNFSM4TC5TLCA>.
|
Sorry, I can not see your images. I think that may be better to use the GitHub interface than reply by email. |
I tried your suggestion, which worked. It does seem there is an inconsistency between how the tests are treated depending on whether question marks (and possibly other symbols) are in the text or not. |
Yes, you are right. I have reviewed the code and found that the exact text matcher trims (cleans spaces, tabs, and newlines) the right side of the output if the searched text end with an alpha char. I tried to reproduce the problem using C, but without including a "\n" at the end of the printf() this is why I don't found the problem. Thanks for your report, I will fix this bug in the next release. |
Thank you for your prompt and very helpful replies. I have another query but I will raise that separately.
…________________________________
From: jcrodriguez-dis <notifications@github.com>
Sent: 30 October 2020 12:38
To: jcrodriguez-dis/moodle-mod_vpl <moodle-mod_vpl@noreply.github.com>
Cc: Stephen Parry <sparry@chapeltownacademy.com>; Author <author@noreply.github.com>
Subject: Re: [jcrodriguez-dis/moodle-mod_vpl] Question Marks break Exact Test (#117)
Yes, you are right.
I have reviewed the code and found that the exact text matcher trims (cleans spaces, tabs, and newlines) the right side of the output if the searched text end with an alpha char.
This code was introduced to avoid frequent fails by newlines at the end of the output.
This code does that the "ABC" matches with print("ABC") in python, but really print("ABC") print also a newline.
I tried to reproduce the problem using C, but without including a "\n" at the end of the printf() this is why I don't found the problem.
Thanks for your report, I will fix this bug in the next release.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#117 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQCFKO6BHXVDPDXFFJG2IL3SNKXVBANCNFSM4TC5TLCA>.
|
Fixed in VPL 3.5 |
If exact text in a test case contains a question mark, it breaks the comparison. so, if you have a test of:
output="ABC?"
This will fail a program that outputs:
ABC?
The text was updated successfully, but these errors were encountered: