diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/css/malformed.css | 1 | ||||
-rw-r--r-- | test/data/css/simple.css | 4 | ||||
-rw-r--r-- | test/parse.c | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/test/data/css/malformed.css b/test/data/css/malformed.css index cfcbb23..4ff885b 100644 --- a/test/data/css/malformed.css +++ b/test/data/css/malformed.css @@ -5,6 +5,7 @@ p { color:green; color: } /* malformed declaration missing value */ p { color:red; color:; color:green } /* same with expected recovery */ p { color:green; color{;color:maroon} } /* unexpected tokens { } */ p { color:red; color{;color:maroon}; color:green } /* same with recovery */ +p { color:red; !important; color:green } @blah <!-- ; @foo --> { moose } diff --git a/test/data/css/simple.css b/test/data/css/simple.css index bfd33b1..aeba2f5 100644 --- a/test/data/css/simple.css +++ b/test/data/css/simple.css @@ -45,3 +45,7 @@ body { font-family: "foo \ */ body { font-family: "unterminated string foo } + +blah { baz: bat; foo: bar !important; } + +foo { bar: ""; } diff --git a/test/parse.c b/test/parse.c index 567c8c4..730ba44 100644 --- a/test/parse.c +++ b/test/parse.c @@ -91,6 +91,8 @@ int main(int argc, char **argv) error = css_parser_parse_chunk(parser, buf, CHUNK_SIZE); assert(error == CSS_OK || error == CSS_NEEDDATA); + + len -= CHUNK_SIZE; } if (len > 0) { |