Skip to content
Permalink
Browse files

testcase for lexing of !important in CSS

  • Loading branch information...
mikesamuel committed Dec 12, 2016
1 parent 55fa578 commit 31d6f98e983b6a573ced92d8097c449c43e79138
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/test/java/org/owasp/html/CssGrammarTest.java
@@ -49,6 +49,7 @@ public static final void testLex() {
"[ url( http://example.com )",
"rgb(255, 127, 127)",
"'strings' \"oh \\\"my\" 'foo bar'",
"color:blue!important",
""));

List<String> actualTokens = Lists.newArrayList();
@@ -96,7 +97,12 @@ public static final void testLex() {
"'strings':STRING",
"'oh \\22my':STRING",
"'foo bar':STRING",
"]:RIGHT_SQUARE"
"color:IDENT",
"::COLON",
"blue:IDENT",
"!:DELIM",
"important:IDENT",
"]:RIGHT_SQUARE" // Manufactured due to unmatched '['.
),
Joiner.on('\n').join(actualTokens));
}

0 comments on commit 31d6f98

Please sign in to comment.
You can’t perform that action at this time.