From 442b1199da2266e2904fabb8bdb83d52369e5e6a Mon Sep 17 00:00:00 2001 From: Delgan Date: Sat, 7 Oct 2023 22:01:11 +0000 Subject: [PATCH] Add initial test preparing "--force-exclude" --- .../tests/cmd/force-exclude.in/_typos.toml | 5 +++++ .../tests/cmd/force-exclude.in/file.ignore | 1 + crates/typos-cli/tests/cmd/force-exclude.toml | 13 +++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 crates/typos-cli/tests/cmd/force-exclude.in/_typos.toml create mode 100644 crates/typos-cli/tests/cmd/force-exclude.in/file.ignore create mode 100644 crates/typos-cli/tests/cmd/force-exclude.toml diff --git a/crates/typos-cli/tests/cmd/force-exclude.in/_typos.toml b/crates/typos-cli/tests/cmd/force-exclude.in/_typos.toml new file mode 100644 index 0000000..434f5f6 --- /dev/null +++ b/crates/typos-cli/tests/cmd/force-exclude.in/_typos.toml @@ -0,0 +1,5 @@ +[files] +extend-exclude = ["file.ignore"] + +[default.extend-identifiers] +hello = "goodbye" diff --git a/crates/typos-cli/tests/cmd/force-exclude.in/file.ignore b/crates/typos-cli/tests/cmd/force-exclude.in/file.ignore new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/crates/typos-cli/tests/cmd/force-exclude.in/file.ignore @@ -0,0 +1 @@ +hello diff --git a/crates/typos-cli/tests/cmd/force-exclude.toml b/crates/typos-cli/tests/cmd/force-exclude.toml new file mode 100644 index 0000000..018de63 --- /dev/null +++ b/crates/typos-cli/tests/cmd/force-exclude.toml @@ -0,0 +1,13 @@ +bin.name = "typos" +args = "file.ignore" +stdin = "" +stdout = """ +error: `hello` should be `goodbye` + --> file.ignore:1:1 + | +1 | hello + | ^^^^^ + | +""" +stderr = "" +status.code = 2