add more string tests

This commit is contained in:
ConnorSkees 2020-03-31 15:15:39 -04:00
parent 526b4aa15f
commit e97ec4eb8b
2 changed files with 20 additions and 0 deletions

View File

@ -208,3 +208,13 @@ test!(
"a {\n color: foo + 1 + bar + 2;\n}\n", "a {\n color: foo + 1 + bar + 2;\n}\n",
"a {\n color: foo1bar2;\n}\n" "a {\n color: foo1bar2;\n}\n"
); );
test!(
unquoted_plus_dbl_quoted,
"a {\n color: foo + \"foo\";\n}\n",
"a {\n color: foofoo;\n}\n"
);
test!(
unquoted_plus_sgl_quoted,
"a {\n color: foo + 'foo';\n}\n",
"a {\n color: foofoo;\n}\n"
);

View File

@ -111,3 +111,13 @@ test!(
"a {\n color: \"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\";\n}\n", "a {\n color: \"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\";\n}\n",
"a {\n color: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\n}\n" "a {\n color: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\n}\n"
); );
test!(
interpolated_inside_string_does_not_produce_unquoted_output,
"a {\n color: \"#{\"\\b\"}\";\n}\n",
"a {\n color: \"\\b\";\n}\n"
);
test!(
unquote_quoted_backslash_single_lowercase_hex_char,
"a {\n color: #{\"\\b\"};\n}\n",
"a {\n color: \x0b;\n}\n"
);