-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
issue with the test-runner on a C exercise #110
Comments
Hello. Thanks for opening an issue on Exercism 🙂 At Exercism we use our Community Forum, not GitHub issues, as the primary place for discussion. That allows maintainers and contributors from across Exercism's ecosystem to discuss your problems/ideas/suggestions without them having to subscribe to hundreds of repositories. This issue will be automatically closed. Please use this link to copy your GitHub Issue into a new topic on the forum, where we look forward to chatting with you! If you're interested in learning more about this auto-responder, please read this blog post. |
Hey @Hamza-Khiar, I played around with your solution and it looks like it is because of the missing newlines as you mentioned. I suspect that what's happening is that the test runner is having trouble parsing the the test output because of your prints. It expects the outputs to look something like this:
When it looks like this, a regex can match whole lines. With your solution, the output looks like:
As a result, it can't find any test results because they're mixed in with your outputs and look less unambiguously like test results. It does tolerate printf output as long as it's terminated with newlines so that it can still match whole lines:
On an unrelated note, it's a good practice to put newlines at the end of your debug prints because C uses buffered output and won't necessarily print all output if your code crashes before a newline is printed which can lead to confusing debug sessions. |
thank you for the fix; and sure next time i'll try to implement a more
sophisticated debugging method rather than printf debugging one.
…On Wed, Apr 17, 2024 at 7:18 AM wolf99 ***@***.***> wrote:
Hi @Hamza-Khiar <https://github.com/Hamza-Khiar>
Just to add to what @ryanplusplus <https://github.com/ryanplusplus> has
already explained, the exercise does not specify, and the tests to not
expect, any printed output.
On the other hand I don't think this is forbidden either. And of course it
does highlight a difference between local and remote execution.
The question is then if there is a good way to solve this, or if we
suggest that students should only implement output that which the exercise
seeks as output.
—
Reply to this email directly, view it on GitHub
<#110 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4I7OG7GPUAPXL3AIS3T5PTY5YH4JAVCNFSM6AAAAABGJ5P6ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRQGQ3DAOBYGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
the exercise was the isogram exercise.
the exercise was done locally at first, downloaded the exercise and solved it in place and all the test were passing
but when i submit the the iteration to the website i get this error;
i couldn't understand what makes it fail when submitted but passes locally.
so here i am i guess there is an issue with the test runner cause when i asked on the discord group, i was told to add a \n for the printf cause it messes with the test-runner.
here's my implementation
The text was updated successfully, but these errors were encountered: