Skip to content

Tighten shopping tests and clarify comment syntax - #993

Merged
glennj merged 3 commits into
exercism:mainfrom
glennj:review-shopping
Dec 6, 2026
Merged

glennj merged 3 commits into
exercism:mainfrom
glennj:review-shopping

Conversation

@glennj

@glennj glennj commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Follow-ups from a review of the shopping concept exercise.

  • Add a task 2 test that counts the lines of a different file, so a hard-coded count no longer passes.
  • Use a filename containing spaces in the tests that pass their own file, so an unquoted $shopping_list_file fails.
  • Clarify that # starts a comment only at the beginning of a word, in the commands-and-arguments concept docs and the exercise introduction.
  • Fix a typo in the instructions.

The example solution passes all 5 tests, and bin/configlet lint and ShellCheck pass.
The Docker test-runner validation was not run.

🤖 Generated with Claude Code

Check that task 2 counts the given file, use a filename with spaces so
unquoted expansions fail, explain that # only starts a comment at the
start of a word, and fix a typo.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!


* The `#` character starts a _comment_.
Any words following the `#` are ignored by the shell; the comment is meant only for reading.
* A word beginning with `#` starts a _comment_.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implies to me that # followed by a space does not start a comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I've added that the # can be a word by itself, as in # like this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to better phrase it, but the wording describing comment-starts feels a bit awkward. Maybe something like, "# starts a comment, except when it is inside a word."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the wording, LMK if it's OK.

I took out the bit about comments being only for reading or only for humans. That should be obvious.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@IsaacG IsaacG left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

@glennj glennj added the ready-to-translate The English in this PR is final; queue its translations label Dec 6, 2026
exercism-i18n Bot added a commit to exercism/i18n that referenced this pull request Dec 6, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@exercism-i18n

exercism-i18n Bot commented Dec 6, 2026

Copy link
Copy Markdown

This PR has been translated 🚀

@glennj
glennj merged commit 46c242f into exercism:main Dec 6, 2026
12 of 13 checks passed
@glennj
glennj deleted the review-shopping branch December 6, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-translate The English in this PR is final; queue its translations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants