| 195 | |
| 196 | |
| 197 | def test_default_word_parsing( |
| 198 | tmp_path: Path, |
| 199 | capsys: pytest.CaptureFixture[str], |
| 200 | ) -> None: |
| 201 | fname = tmp_path / "backtick" |
| 202 | with fname.open("a") as f: |
| 203 | f.write("`abandonned`\n") |
| 204 | assert cs.main(fname) == 1, "bad" |
| 205 | |
| 206 | fname = tmp_path / "apostrophe" |
| 207 | fname.write_text("woudn't\n", encoding="utf-8") # U+0027 |
| 208 | assert cs.main(fname) == 1, "misspelling containing typewriter apostrophe U+0027" |
| 209 | fname.write_text("woudn’t\n", encoding="utf-8") # U+2019 # noqa: RUF001 |
| 210 | assert cs.main(fname) == 1, "misspelling containing typographic apostrophe U+2019" |
| 211 | |
| 212 | |
| 213 | def test_bad_glob( |