From 3324a42f49da4f77df07956e3fde5481be092873 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Mon, 6 Jan 2020 00:39:02 -0500 Subject: [PATCH] Add tests for !important and concatenating hyphens --- src/format.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/format.rs b/src/format.rs index 744ba54..d328af7 100644 --- a/src/format.rs +++ b/src/format.rs @@ -227,6 +227,24 @@ mod test_scss { "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_not_attached, "a {\n height: 1 px;\n}\n"); test!(unit_px, "a {\n height: 1px;\n}\n");