From 2ee6ef4654dd0b0443b4b2d50e2658c075116634 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 17 Mar 2023 23:45:54 -0500 Subject: [PATCH] test(cli): Show extend-ignore-identifiers-re bug --- .../_typos.toml | 12 ++++++++++++ .../extend-ignore-identifiers-re.in/file.fail | 1 + .../file.ignore | 1 + .../cmd/extend-ignore-identifiers-re.toml | 18 ++++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/_typos.toml create mode 100644 crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/file.fail create mode 100644 crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/file.ignore create mode 100644 crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.toml diff --git a/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/_typos.toml b/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/_typos.toml new file mode 100644 index 0000000..ac8e24c --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/_typos.toml @@ -0,0 +1,12 @@ +[files] +extend-exclude = ["_typos.toml"] + +[default.extend-identifiers] +hello = "goodbye" + +[type.fail] +extend-glob = ["*.fail"] + +[type.ignore] +extend-glob = ["*.ignore"] +extend-ignore-identifiers-re = ["he.*"] diff --git a/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/file.fail b/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/file.fail new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/file.fail @@ -0,0 +1 @@ +hello diff --git a/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/file.ignore b/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/file.ignore new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.in/file.ignore @@ -0,0 +1 @@ +hello diff --git a/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.toml b/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.toml new file mode 100644 index 0000000..cef8a56 --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-ignore-identifiers-re.toml @@ -0,0 +1,18 @@ +bin.name = "typos" +status.code = 2 +stdin = "" +stdout = """ +error: `hello` should be `goodbye` + --> ./file.fail:1:1 + | +1 | hello + | ^^^^^ + | +error: `hello` should be `goodbye` + --> ./file.ignore:1:1 + | +1 | hello + | ^^^^^ + | +""" +stderr = ""