-
-
Notifications
You must be signed in to change notification settings - Fork 93
Open
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.
Metadata
Metadata
Assignees
Labels
No labels