From 5263883e9e9e696b2f9228d6971c8677ff866df2 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Fri, 29 Mar 2024 21:56:39 +0200 Subject: [PATCH] dev: add fix test for mirror linter --- test/testdata/fix/in/mirror.go | 11 +++++++++++ test/testdata/fix/out/mirror.go | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 test/testdata/fix/in/mirror.go create mode 100644 test/testdata/fix/out/mirror.go diff --git a/test/testdata/fix/in/mirror.go b/test/testdata/fix/in/mirror.go new file mode 100644 index 000000000000..94c0637f3dee --- /dev/null +++ b/test/testdata/fix/in/mirror.go @@ -0,0 +1,11 @@ +//golangcitest:args -Emirror +//golangcitest:expected_exitcode 0 +package testdata + +import ( + "unicode/utf8" +) + +func foobar() { + _ = utf8.RuneCount([]byte("foobar")) +} diff --git a/test/testdata/fix/out/mirror.go b/test/testdata/fix/out/mirror.go new file mode 100644 index 000000000000..05cbc5447752 --- /dev/null +++ b/test/testdata/fix/out/mirror.go @@ -0,0 +1,11 @@ +//golangcitest:args -Emirror +//golangcitest:expected_exitcode 0 +package testdata + +import ( + "unicode/utf8" +) + +func foobar() { + _ = utf8.RuneCountInString("foobar") +}