diff --git a/tests/examples.trycmd b/tests/examples.trycmd new file mode 100644 index 0000000..49a0baf --- /dev/null +++ b/tests/examples.trycmd @@ -0,0 +1,33 @@ +# Run test on example files + +# Go + +``` +$ unicop example-files/examples.go +IO error for operation on example-files/examples.go: No such file or directory (os error 2) + +``` + + +# Typescript + +``` +$ unicop example-files/examples.ts + × found disallowed character LATIN LETTER RETROFLEX CLICK in identifier + ╭─[example-files/examples.ts:11:16] + 10 │ // Homoglyph + 11 │ if (environmentǃ=ENV_PROD) {} + · ┬ + · ╰── LATIN LETTER RETROFLEX CLICK + 12 │ + ╰──── + × found disallowed character HANGUL JUNGSEONG FILLER in + │ shorthand_property_identifier_pattern + ╭─[example-files/examples.ts:14:17] + 13 │ // Invisible + 14 │ const { timeout,ᅠ} = req.query; + · ┬ + · ╰── HANGUL JUNGSEONG FILLER + ╰──── + +``` diff --git a/tests/trycmd.rs b/tests/trycmd.rs index 2bfc3fa..ceda076 100644 --- a/tests/trycmd.rs +++ b/tests/trycmd.rs @@ -1,4 +1,6 @@ #[test] fn trycmd() { - trycmd::TestCases::new().case("README.md"); + trycmd::TestCases::new() + .case("README.md") + .case("tests/examples.trycmd"); }