From d34c8e64c325a5214ab84c08d19840a12126f674 Mon Sep 17 00:00:00 2001 From: SeongChan Lee Date: Tue, 26 Apr 2022 14:58:33 +0900 Subject: [PATCH] test: Add e2e test for multiwidth characters --- tests/cmd/stdin-failure-multiwidth.stdin | 5 ++++ tests/cmd/stdin-failure-multiwidth.stdout | 30 +++++++++++++++++++++++ tests/cmd/stdin-failure-multiwidth.toml | 3 +++ 3 files changed, 38 insertions(+) create mode 100644 tests/cmd/stdin-failure-multiwidth.stdin create mode 100644 tests/cmd/stdin-failure-multiwidth.stdout create mode 100644 tests/cmd/stdin-failure-multiwidth.toml diff --git a/tests/cmd/stdin-failure-multiwidth.stdin b/tests/cmd/stdin-failure-multiwidth.stdin new file mode 100644 index 0000000..0c451e2 --- /dev/null +++ b/tests/cmd/stdin-failure-multiwidth.stdin @@ -0,0 +1,5 @@ +한 Apropriate world +한 Apropriate world +😵‍💫 Apropriate world +👁️‍🗨️ Apropriate world + Apropriate world \ No newline at end of file diff --git a/tests/cmd/stdin-failure-multiwidth.stdout b/tests/cmd/stdin-failure-multiwidth.stdout new file mode 100644 index 0000000..08fc6ec --- /dev/null +++ b/tests/cmd/stdin-failure-multiwidth.stdout @@ -0,0 +1,30 @@ +error: `Apropriate` should be `Appropriate` + --> -:1:2 + | +1 | 한 Apropriate world + | ^^^^^^^^^^ + | +error: `Apropriate` should be `Appropriate` + --> -:2:2 + | +2 | 한 Apropriate world + | ^^^^^^^^^^ + | +error: `Apropriate` should be `Appropriate` + --> -:3:2 + | +3 | 😵‍💫 Apropriate world + | ^^^^^^^^^^ + | +error: `Apropriate` should be `Appropriate` + --> -:4:2 + | +4 | 👁️‍🗨️ Apropriate world + | ^^^^^^^^^^ + | +error: `Apropriate` should be `Appropriate` + --> -:5:1 + | +5 | Apropriate world + | ^^^^^^^^^^ + | diff --git a/tests/cmd/stdin-failure-multiwidth.toml b/tests/cmd/stdin-failure-multiwidth.toml new file mode 100644 index 0000000..18f517f --- /dev/null +++ b/tests/cmd/stdin-failure-multiwidth.toml @@ -0,0 +1,3 @@ +bin.name = "typos" +args = "-" +status.code = 2 \ No newline at end of file