Add tests for !important and concatenating hyphens

This commit is contained in:
ConnorSkees 2020-01-06 00:39:02 -05:00
parent cf1317ac79
commit 3324a42f49

View File

@ -227,6 +227,24 @@ mod test_scss {
"a {\n height: 1 1px;\n}\n" "a {\n height: 1 1px;\n}\n"
); );
test!(keyword_important, "a {\n height: 1 !important;\n}\n");
test!(
keyword_important_uppercase,
"a {\n height: 1 !IMPORTANT;\n}\n",
"a {\n height: 1 !important;\n}\n"
);
test!(
combines_hyphens,
"a {\n foo: bar - baz;\n}\n",
"a {\n foo: bar-baz;\n}\n"
);
test!(does_not_combine_hyphens, "a {\n foo: bar -baz;\n}\n");
test!(
ident_starts_with_hyphen,
"a {\n foo: -webkit-bar-baz;\n}\n"
);
test!(unit_none, "a {\n height: 1;\n}\n"); test!(unit_none, "a {\n height: 1;\n}\n");
test!(unit_not_attached, "a {\n height: 1 px;\n}\n"); test!(unit_not_attached, "a {\n height: 1 px;\n}\n");
test!(unit_px, "a {\n height: 1px;\n}\n"); test!(unit_px, "a {\n height: 1px;\n}\n");