Add `-n` test to reverse-string ?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- bash
- Domain
- testing-qa
Research direction
Locate the reverse-string exercise's existing test file and review how skipped tests and BATS_RUN_SKIPPED are handled. Add the proposed echo -n case only if the exercise's maintainers approve the difficulty change, then run the exercise tests and verify that n- produces -n successfully.
Written by the indexing model from the issue text.
Description
Given that the builtin echo command cannot output the string "-n" (ref Why is printf better than echo?), we could amp up the difficulty of reverse-string by adding another diabolical test:
@test "echo -n" {
[[ $BATS_RUN_SKIPPED == "true" ]] || skip
run bash reverse_string.sh 'n-'
assert_success
assert_output -- '-n'
}
This will force the student to learn about a fairly nasty echo edge case.
On the other hand, reverse-string is currently an easy exercise with difficulty 1, and adding this test is likely to break a large proportion of existing solutions.
- Dominant language
- Shell
- Stars
- 117
- Forks
- 99
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
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/bash
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Add github action to shellcheck bash repoMay be free again @glennj claimed this 112 days ago, and no pull request is open. Open
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Simplify two-fer tests _a bit_May be free again @glennj claimed this 1312 days ago, and no pull request is open. Open
-
Build representerOpenx:action/create x:knowledge/advanced x:module/representer x:size/massive x:type/coding
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
omarchy-menu-keybindings lua bind scan spins at 100% CPU when user config iterates a mocked hl APIOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
omacom/omarchy#14302 · 1 comment ·
Maintainers usually reply within 1 day
-
Link Checker ReportPossibly taken @keraron claimed this today. Openautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
a2aproject/A2A#2297 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
mattpocock/skills#1165 ·
-
agent-research-finding agent-research-recommend chore ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
jordansmall/spindrift#4487 · 1 comment ·
Maintainers usually reply within 1 day