From fdf8e6136c86e03ac219777e15f80e5b7520b278 Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Thu, 13 Aug 2020 17:20:29 -0400 Subject: [PATCH] add more tests for unicode range edge cases --- tests/unicode-range.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/unicode-range.rs b/tests/unicode-range.rs index 80e7a5e..cfca504 100644 --- a/tests/unicode-range.rs +++ b/tests/unicode-range.rs @@ -16,3 +16,27 @@ test!( "a {\n color: U+45????;\n}\n", "a {\n color: U+45????;\n}\n" ); +test!( + lowercase_u, + "a {\n color: u+27a;\n}\n", + "a {\n color: u+27a;\n}\n" +); +error!( + interpolated_range, + "a {\n color: U+2A#{70}C;\n}\n", "Error: Expected end of identifier." +); +error!( + unicode_escape_within_range, + "a {\n color: U+B\\a;\n}\n", "Error: Expected end of identifier." +); +error!( + longer_than_6_characters, + "a {\n color: U+1234567;\n}\n", "Error: Expected end of identifier." +); +// I believe this to be a bug in the dart-sass implementation +// we test for it to ensure full parity +test!( + length_of_6_with_question_mark, + "a {\n color: U+123456?;\n}\n", + "a {\n color: U+123456?;\n}\n" +);