From de9928a5f813f2e450c1fbd14f0067ed8bddfacb Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 25 Jul 2024 09:14:30 -0500 Subject: [PATCH] test: Show countr behavior --- .../typos-cli/tests/cmd/false-positives.in/sample.cpp | 5 +++++ crates/typos-cli/tests/cmd/false-positives.toml | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 crates/typos-cli/tests/cmd/false-positives.in/sample.cpp diff --git a/crates/typos-cli/tests/cmd/false-positives.in/sample.cpp b/crates/typos-cli/tests/cmd/false-positives.in/sample.cpp new file mode 100644 index 0000000..40455b1 --- /dev/null +++ b/crates/typos-cli/tests/cmd/false-positives.in/sample.cpp @@ -0,0 +1,5 @@ +int main() { + uint8 i = 0; + std::countr_one(i); + return 0; +} diff --git a/crates/typos-cli/tests/cmd/false-positives.toml b/crates/typos-cli/tests/cmd/false-positives.toml index 324f41d..0df3d54 100644 --- a/crates/typos-cli/tests/cmd/false-positives.toml +++ b/crates/typos-cli/tests/cmd/false-positives.toml @@ -1,4 +1,12 @@ bin.name = "typos" stdin = "" -stdout = "" +stdout = """ +error: `countr` should be `counter`, `contour`, `country`, `county` + --> ./sample.cpp:3:10 + | +3 | std::countr_one(i); + | ^^^^^^ + | +""" stderr = "" +status.code = 2