From 86c4c9fb4a37cfeb121e4a1e98dcdb6b4b34e68e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 13 Dec 2023 08:34:49 -0600 Subject: [PATCH] test(cli): Add reproduction case --- .../tests/cmd/extend-words-case.in/_typos.toml | 2 ++ .../tests/cmd/extend-words-case.in/file.txt | 1 + crates/typos-cli/tests/cmd/extend-words-case.toml | 13 +++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 crates/typos-cli/tests/cmd/extend-words-case.in/_typos.toml create mode 100644 crates/typos-cli/tests/cmd/extend-words-case.in/file.txt create mode 100644 crates/typos-cli/tests/cmd/extend-words-case.toml diff --git a/crates/typos-cli/tests/cmd/extend-words-case.in/_typos.toml b/crates/typos-cli/tests/cmd/extend-words-case.in/_typos.toml new file mode 100644 index 00000000..97a66dbe --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-words-case.in/_typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +"trailling" = "trailing" diff --git a/crates/typos-cli/tests/cmd/extend-words-case.in/file.txt b/crates/typos-cli/tests/cmd/extend-words-case.in/file.txt new file mode 100644 index 00000000..5a479ac2 --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-words-case.in/file.txt @@ -0,0 +1 @@ +public function noErrorOnTraillingSemicolonAndWhitespace(Connection $connection) diff --git a/crates/typos-cli/tests/cmd/extend-words-case.toml b/crates/typos-cli/tests/cmd/extend-words-case.toml new file mode 100644 index 00000000..cef3b951 --- /dev/null +++ b/crates/typos-cli/tests/cmd/extend-words-case.toml @@ -0,0 +1,13 @@ +bin.name = "typos" +args = "" +status.code = 2 +stdin = "" +stdout = """ +error: `Trailling` should be `trailing` + --> ./file.txt:1:26 + | +1 | public function noErrorOnTraillingSemicolonAndWhitespace(Connection $connection) + | ^^^^^^^^^ + | +""" +stderr = ""