jarv / cmdchallenge

This repo is mirror of https://gitlab.com/jarv/cmdchallenge
https://about.cmdchallenge.com
MIT License
721 stars 71 forks source link

Hello World Challenge Misleading #142

Open theonewolf opened 7 years ago

theonewolf commented 7 years ago

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

jarv commented 7 years ago

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.

keeferrourke commented 7 years ago

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

0ki commented 7 years ago

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.