From 3f41a6791c31127849eea17030ed03152b99b445 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 9 Aug 2023 08:15:05 -0500 Subject: [PATCH] test(cli): Verify disallowed functionality --- .../tests/cmd/config-disallowed.in/_typos.toml | 2 ++ .../tests/cmd/config-disallowed.in/file | 1 + .../typos-cli/tests/cmd/config-disallowed.toml | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 crates/typos-cli/tests/cmd/config-disallowed.in/_typos.toml create mode 100644 crates/typos-cli/tests/cmd/config-disallowed.in/file create mode 100644 crates/typos-cli/tests/cmd/config-disallowed.toml diff --git a/crates/typos-cli/tests/cmd/config-disallowed.in/_typos.toml b/crates/typos-cli/tests/cmd/config-disallowed.in/_typos.toml new file mode 100644 index 0000000..56a17b6 --- /dev/null +++ b/crates/typos-cli/tests/cmd/config-disallowed.in/_typos.toml @@ -0,0 +1,2 @@ +[default.extend-identifiers] +hello = "" diff --git a/crates/typos-cli/tests/cmd/config-disallowed.in/file b/crates/typos-cli/tests/cmd/config-disallowed.in/file new file mode 100644 index 0000000..b4cfe09 --- /dev/null +++ b/crates/typos-cli/tests/cmd/config-disallowed.in/file @@ -0,0 +1 @@ +hello `hello` diff --git a/crates/typos-cli/tests/cmd/config-disallowed.toml b/crates/typos-cli/tests/cmd/config-disallowed.toml new file mode 100644 index 0000000..e484ec5 --- /dev/null +++ b/crates/typos-cli/tests/cmd/config-disallowed.toml @@ -0,0 +1,17 @@ +bin.name = "typos" +stdin = "" +stdout = """ +error: `hello` is disallowed + --> ./file:1:1 + | +1 | hello `hello` + | ^^^^^ + | +error: `hello` is disallowed + --> ./file:1:8 + | +1 | hello `hello` + | ^^^^^ + | +""" +stderr = ""