diff --git a/crates/typos-cli/tests/cmd/false-positives.in/sample.jl b/crates/typos-cli/tests/cmd/false-positives.in/sample.jl new file mode 100644 index 0000000..ba7f7a7 --- /dev/null +++ b/crates/typos-cli/tests/cmd/false-positives.in/sample.jl @@ -0,0 +1,6 @@ +# one egal: === +# three egals: === === === + +# When we need to refer to keywords without saying them +var modul = "hello"; +var usig = "hello"; diff --git a/crates/typos-cli/tests/cmd/false-positives.toml b/crates/typos-cli/tests/cmd/false-positives.toml index 324f41d..41e44a3 100644 --- a/crates/typos-cli/tests/cmd/false-positives.toml +++ b/crates/typos-cli/tests/cmd/false-positives.toml @@ -1,4 +1,30 @@ bin.name = "typos" stdin = "" -stdout = "" +stdout = """ +error: `egal` should be `equal` + --> ./sample.jl:1:7 + | +1 | # one egal: === + | ^^^^ + | +error: `egals` should be `equals` + --> ./sample.jl:2:9 + | +2 | # three egals: === === === + | ^^^^^ + | +error: `modul` should be `module` + --> ./sample.jl:5:5 + | +5 | var modul = \"hello\"; + | ^^^^^ + | +error: `usig` should be `using` + --> ./sample.jl:6:5 + | +6 | var usig = \"hello\"; + | ^^^^ + | +""" stderr = "" +status.code = 2