From 9d376417a0dfef81b0118146f1254acb784ae7fd Mon Sep 17 00:00:00 2001 From: Ed Page Date: Sat, 18 Mar 2023 01:20:01 -0500 Subject: [PATCH] test: Baseline for generic ignore --- .../tests/cmd/extend-ignore-re.in/_typos.toml | 5 +++++ .../tests/cmd/extend-ignore-re.in/file.ignore | 1 + .../typos-cli/tests/cmd/extend-ignore-re.toml | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 crates/typos-cli/tests/cmd/extend-ignore-re.in/_typos.toml create mode 100644 crates/typos-cli/tests/cmd/extend-ignore-re.in/file.ignore create mode 100644 crates/typos-cli/tests/cmd/extend-ignore-re.toml diff --git a/crates/typos-cli/tests/cmd/extend-ignore-re.in/_typos.toml b/crates/typos-cli/tests/cmd/extend-ignore-re.in/_typos.toml new file mode 100644 index 00000000..de98037f --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-ignore-re.in/_typos.toml @@ -0,0 +1,5 @@ +[files] +extend-exclude = ["_typos.toml"] + +[default.extend-identifiers] +hello = "goodbye" diff --git a/crates/typos-cli/tests/cmd/extend-ignore-re.in/file.ignore b/crates/typos-cli/tests/cmd/extend-ignore-re.in/file.ignore new file mode 100644 index 00000000..b4cfe094 --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-ignore-re.in/file.ignore @@ -0,0 +1 @@ +hello `hello` diff --git a/crates/typos-cli/tests/cmd/extend-ignore-re.toml b/crates/typos-cli/tests/cmd/extend-ignore-re.toml new file mode 100644 index 00000000..f87f0830 --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-ignore-re.toml @@ -0,0 +1,18 @@ +bin.name = "typos" +stdin = "" +stdout = """ +error: `hello` should be `goodbye` + --> ./file.ignore:1:1 + | +1 | hello `hello` + | ^^^^^ + | +error: `hello` should be `goodbye` + --> ./file.ignore:1:8 + | +1 | hello `hello` + | ^^^^^ + | +""" +stderr = "" +status.code = 2