Word Count: Apostrophe bug that users' submissions could plausibly include, that current tests won't detect
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 40/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- testing
Research direction
Start in the linked exercises/word-count specification and inspect the test case covering words with apostrophes. Add an example with more than one letter after the apostrophe, such as “you’re,” and confirm the word-count tests detect implementations that handle only one trailing letter.
Written by the indexing model from the issue text.
Description
The current test suite for the word-count exercise tests for words containing apostrophes, but the only examples used in the test cases themselves are words that only have one letter after the apostrophe (specifically, "can't" and "don't").
As a consequence, if a user implements code that doesn't correctly handle words with more than one letter after the apostrophe (like I did, with a regex that looked like /([a-z]+'[a-z]| ... )/) the tests will not identify the problem. There aren't a lot of English examples where this might cause miscounts - the only one I could think of was "m'lord"/"m'lady", other than fantasy stuff like "bat'leth"/"bat'leths" - but the thought process that got me there seems pretty plausible as a mistake others might make (I looked at the test cases, saw "don't" and "can't", and thought of "I'm" and "he's", and didn't think of "you're" and "they'll"), so it seems like something worth checking for in the test cases.
Seems like a pretty easy fix to update the "with apostrophes" test case to include a word like "you're" or whatever, I'm happy to submit a PR if it's agreed as worthwhile.
- Dominant language
- Ruby
- Stars
- 362
- Forks
- 566
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from exercism/problem-specifications
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
exercism/problem-specifications#2686 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
exercism/problem-specifications#2704 · 21 comments · 8 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 35/100
exercism/problem-specifications#2153 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
exercism/problem-specifications#2120 · 7 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
exercism/problem-specifications#2108 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
All issues in exercism/problem-specifications
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Bug Ruby Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-ruby#3228 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
開発用DockerイメージにPlaywrightのシステム依存を追加するPossibly taken @momocus claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
sakazuki-org/sakazuki#1453 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100