Various tests

This commit is contained in:
ConnorSkees 2020-02-24 09:38:05 -05:00
parent 776e6444e6
commit 404c7fb66a
3 changed files with 19 additions and 0 deletions

View File

@ -36,6 +36,11 @@ test!(
"a {\n color: rgb(255, 0, 0, 255);\n}\n", "a {\n color: rgb(255, 0, 0, 255);\n}\n",
"a {\n color: red;\n}\n" "a {\n color: red;\n}\n"
); );
test!(
rgb_negative,
"a {\n color: rgb(-1, 1, 1);\n}\n",
"a {\n color: #000101;\n}\n"
);
test!( test!(
rgb_binop, rgb_binop,
"a {\n color: rgb(1, 2, 1+2);\n}\n", "a {\n color: rgb(1, 2, 1+2);\n}\n",

View File

@ -7,6 +7,10 @@ test!(
ident_starts_with_hyphen, ident_starts_with_hyphen,
"a {\n foo: -webkit-bar-baz;\n}\n" "a {\n foo: -webkit-bar-baz;\n}\n"
); );
test!(
ident_starts_with_double_hyphen,
"a {\n foo: --webkit-bar-baz;\n}\n"
);
test!(ident_with_num, "el1 {\n a: b;\n}\n"); test!(ident_with_num, "el1 {\n a: b;\n}\n");
test!(keyword_important, "a {\n height: 1 !important;\n}\n"); test!(keyword_important, "a {\n height: 1 !important;\n}\n");
test!( test!(
@ -28,3 +32,8 @@ test!(
"a {\n color: green;\n}\n" "a {\n color: green;\n}\n"
); );
test!(utf8_input, "a {\n color: 🦆;\n}\n"); test!(utf8_input, "a {\n color: 🦆;\n}\n");
// test!(
// ends_with_several_semicolons,
// "a {\n color: red;;\n}\n",
// "a {\n color: red;\n}\n"
// );

View File

@ -266,3 +266,8 @@ test!(
"#foo #bar,,\n,#baz #boom, {a: b}", "#foo #bar,,\n,#baz #boom, {a: b}",
"#foo #bar,\n#baz #boom {\n a: b;\n}\n" "#foo #bar,\n#baz #boom {\n a: b;\n}\n"
); );
// test!(
// trailing_comma_children,
// "a,, {\n b {\n color: /**/red;\n }\n}\n",
// "a b {\n color: red;\n}\n"
// );