cmdchallenge icon indicating copy to clipboard operation
cmdchallenge copied to clipboard

Hello World Challenge Misleading

Open theonewolf opened this issue 8 years ago • 3 comments

Summary

The first "hello world" challenge is slightly misleading. Tools such as echo emit an extra \n character, which was not included in the question description.

If you attempt to solve this problem verbatim and do, for example, printf 'hello world' you will not pass the challenge.

I had to do printf 'hello world\n' in order to pass, which I think is not reflected in the question description.

Steps to reproduce

If applicable please provide a direct link to the challenge, example: https://cmdchallenge.com/#/hello_world

theonewolf avatar Jun 06 '17 18:06 theonewolf

Thanks for the report, the description could probably be improved here. This came up in a different issue and it might be a good idea to mention the line ending in the hello world problem like you suggested as it applies for all of them.

jarv avatar Jul 06 '17 06:07 jarv

Furthermore, the prompt still prints a newline in the output for printf "hello world", where it should not.

keeferrourke avatar Aug 20 '17 15:08 keeferrourke

I think rather than rewriting all the challenges the right solution would be for @jarv to add a phantom \n at the end of the output, if it's missing, before verifying the output.

0ki avatar Aug 22 '17 16:08 0ki