diff --git a/fixtures/typos/good/Clean.txt b/fixtures/typos/good/Clean.txt index 31a06f3..e34ff46 100644 --- a/fixtures/typos/good/Clean.txt +++ b/fixtures/typos/good/Clean.txt @@ -3,4 +3,21 @@ This sentence is spelled correctly and should pass the spell checker. A separate concern is handled here, and the receipt is acknowledged. +Each block below plants a real misspelling that typos would normally flag, then +silences it with one of the four blessed ignore directives. The whole fixture +must still exit 0; if any directive stopped working, the planted misspelling +would surface and fail this fixture. + teh # spellchecker:disable-line + +# spellchecker:ignore-next-line +recieve + +# spellchecker:off +seperate +occured +# spellchecker:on + + +definately + diff --git a/modules/typos/typos.test.sh b/modules/typos/typos.test.sh index c5c8973..a5a53fc 100644 --- a/modules/typos/typos.test.sh +++ b/modules/typos/typos.test.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash -# Tests the typos module: the spell-checker passes the good fixture (including -# an inline `spellchecker:disable-line` directive) and flags the bad fixture. -# Skips cleanly when the engine is absent. +# Tests the typos module: the spell-checker passes the good fixture and flags +# the bad fixture. The good fixture plants a real misspelling under each of the +# four blessed ignore directives (disable-line, ignore-next-line, the comment +# block, and the HTML-comment block), so a good->exit-0 result conjunctively +# proves every directive form still suppresses. Skips when the engine is absent. set -uo pipefail # shellcheck source=harness/shell/lib.sh source "$(git rev-parse --show-toplevel)/harness/shell/lib.sh"