From 9f1d7017e2af7c126c9cc99feabdac5b182d1fe8 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 25 Sep 2023 12:46:00 -0500 Subject: [PATCH] test(cli): Show existing O_WRONLY behavior --- .../typos-cli/tests/cmd/false-positives.in/sample.py | 4 ++++ crates/typos-cli/tests/cmd/false-positives.toml | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/crates/typos-cli/tests/cmd/false-positives.in/sample.py b/crates/typos-cli/tests/cmd/false-positives.in/sample.py index dcf674d..692ff28 100644 --- a/crates/typos-cli/tests/cmd/false-positives.in/sample.py +++ b/crates/typos-cli/tests/cmd/false-positives.in/sample.py @@ -1 +1,5 @@ +import os + from numpy.typing import NDArray # should work + +print(os.O_WRONLY) # should work diff --git a/crates/typos-cli/tests/cmd/false-positives.toml b/crates/typos-cli/tests/cmd/false-positives.toml index 324f41d..a582f88 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: `WRONLY` should be `WRONGLY` + --> ./sample.py:5:12 + | +5 | print(os.O_WRONLY) # should work + | ^^^^^^ + | +""" stderr = "" +status.code = 2