From 30711f43a6cad9889ee1af8539658c4ca1f59854 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Fri, 5 Dec 2014 16:09:53 +0100 Subject: Further work on implementing CSSRuleSets. This needs further testing, though. --- test/plugins/css/CSSParserTest.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'test/plugins') 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 root = instance.parse(input, ctx).cast(); + + +} + } } } -- cgit v1.2.3