diff --git a/crates/typos-cli/tests/cmd/ignore-block.in/_typos.toml b/crates/typos-cli/tests/cmd/ignore-block.in/_typos.toml new file mode 100644 index 0000000..26f87f5 --- /dev/null +++ b/crates/typos-cli/tests/cmd/ignore-block.in/_typos.toml @@ -0,0 +1,5 @@ +[default] +extend-ignore-re = ["#\\s*spellchecker:off\\s*\\n.*\\n\\s*#\\s*spellchecker:on"] + +[default.extend-identifiers] +hello = "goodbye" diff --git a/crates/typos-cli/tests/cmd/ignore-block.in/file.ignore b/crates/typos-cli/tests/cmd/ignore-block.in/file.ignore new file mode 100644 index 0000000..f4ffbfc --- /dev/null +++ b/crates/typos-cli/tests/cmd/ignore-block.in/file.ignore @@ -0,0 +1,5 @@ +hello +# spellchecker:off +hello +# spellchecker:on +hello diff --git a/crates/typos-cli/tests/cmd/ignore-block.toml b/crates/typos-cli/tests/cmd/ignore-block.toml new file mode 100644 index 0000000..402b757 --- /dev/null +++ b/crates/typos-cli/tests/cmd/ignore-block.toml @@ -0,0 +1,18 @@ +bin.name = "typos" +stdin = "--sort" +stdout = """ +error: `hello` should be `goodbye` + --> ./file.ignore:1:1 + | +1 | hello + | ^^^^^ + | +error: `hello` should be `goodbye` + --> ./file.ignore:5:1 + | +5 | hello + | ^^^^^ + | +""" +stderr = "" +status.code = 2