Closed ghost closed 9 years ago
github changed the numbering when I saved it in this post (above), should have been 1,1,2,2, etc. as it displays when output to the console.
I see what you mean, the final comparison is pretty misleading; it's showing that expected empty string doesn't match actual of nothing. Not so helpful..
1. ACTUAL: "<html>"
1. EXPECTED: "<html>"
2. ACTUAL: " <head><title>Hello the handling</title></head>"
2. EXPECTED: " <head><title>Hello the handling</title></head>"
3. ACTUAL: " <body>"
3. EXPECTED: " <body>"
4. ACTUAL: " Hello the handling"
4. EXPECTED: " Hello the handling"
5. ACTUAL: " </body>"
5. EXPECTED: " </body>"
6. ACTUAL: "</html>"
6. EXPECTED: "</html>"
7. ACTUAL: ""
7. EXPECTED: ""
8. ACTUAL:
8. EXPECTED: ""
I'll add a note note in the hints section regarding the expectation for a newline at EOF.
Thanks for pointing this out :)
You'll have to look at the code again @fiveisprime but i recall it uses a joi schema to get an EXACT file match so if you have anything extra it will fail that validation. I'm sure you could change that logic to be more relaxed.
@lloydbenson I was hoping that would be the case, but it looks like the actual
validation is handled in the workshopper-exercise module, which compares
solutionStdout
and submissionStdout
directly.
I could probably try to be smart and add/remove the trailing newline, but I don't feel so great about that. I've seen the same issue in other workshoppers (specifically, learnyounode's "my first i/o" exercise) where the "solution" is documentation.
That's how I got here, but I'll keep digging. I really appreciate your suggestion btw :heart:
Fixed in 2.0.1 :+1:
The following output confused me for a while, because the output is correct (but fails). What finally made this test PASS was simply adding a blank line at the end of the HTML in the template. Without a blank line at the end, this test fails with insufficient explanation (see below):
Your submission results compared to the expected:
────────────────────────────────────────────
────────────────────────────────────────────
✗ Submission results did not match expected!
FAIL
Your solution to VIEWS didn't pass. Try again!