summaryrefslogtreecommitdiff
path: root/test/plugins
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2014-12-05 16:09:53 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2014-12-05 16:09:53 +0100
commit30711f43a6cad9889ee1af8539658c4ca1f59854 (patch)
treed37c88faf794ad2632fc787ec1724c9ec08bdbd1 /test/plugins
parent30765a8bbf30aafad89a632afc39966c5b4029b8 (diff)
Further work on implementing CSSRuleSets. This needs further testing, though.
Diffstat (limited to 'test/plugins')
-rw-r--r--test/plugins/css/CSSParserTest.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/plugins/css/CSSParserTest.cpp b/test/plugins/css/CSSParserTest.cpp
index 20d0836..8880fc5 100644
--- a/test/plugins/css/CSSParserTest.cpp
+++ b/test/plugins/css/CSSParserTest.cpp
@@ -121,6 +121,37 @@ TEST(CSSParser, testParseSelectors)
ASSERT_EQ(0, Ag->getEdges().size());
ASSERT_TRUE(Ag->isAccepting());
}
+
+TEST(CSSParser, testParseCSS)
+{
+ // create the CSS input
+ std::stringstream input;
+ input << "A, B A {\n";
+ input << "/*\n";
+ input << " * Some multiline\n";
+ input << " * comment\n";
+ input << " */\n";
+ input << "\t ident1 : \"val1\";\n";
+ input << "\t ident2 : \"val2\";\n";
+ input << "}\n";
+ input << "A:select(a,b) {\n";
+ input << "\t ident3 : \"val3\";\n";
+ input << "}\n";
+ input << "A {\n";
+ input << "\t ident1 : \"val4\";\n";
+ input << "}\n";
+
+
+ // initialize an empty parser context.
+ StandaloneParserContext ctx;
+
+ // parse the input.
+ CSSParser instance;
+ Rooted<SelectorNode> root = instance.parse(input, ctx).cast<SelectorNode>();
+
+
+}
+
}
}
}