From 404c7fb66aa9b4aa9820418da1e81c16a217c9c4 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Mon, 24 Feb 2020 09:38:05 -0500 Subject: [PATCH] Various tests --- tests/color.rs | 5 +++++ tests/misc.rs | 9 +++++++++ tests/selectors.rs | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/tests/color.rs b/tests/color.rs index 37ca98a..14894fc 100644 --- a/tests/color.rs +++ b/tests/color.rs @@ -36,6 +36,11 @@ test!( "a {\n color: rgb(255, 0, 0, 255);\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!( rgb_binop, "a {\n color: rgb(1, 2, 1+2);\n}\n", diff --git a/tests/misc.rs b/tests/misc.rs index 21ee1d7..5af7de1 100644 --- a/tests/misc.rs +++ b/tests/misc.rs @@ -7,6 +7,10 @@ test!( ident_starts_with_hyphen, "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!(keyword_important, "a {\n height: 1 !important;\n}\n"); test!( @@ -28,3 +32,8 @@ test!( "a {\n color: green;\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" +// ); diff --git a/tests/selectors.rs b/tests/selectors.rs index 24e7200..40b193e 100644 --- a/tests/selectors.rs +++ b/tests/selectors.rs @@ -266,3 +266,8 @@ test!( "#foo #bar,,\n,#baz #boom, {a: b}", "#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" +// );