diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-01 01:15:31 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-01 01:15:31 +0000 |
commit | da22dbf81c7310a5c6195c26922d07652c88392f (patch) | |
tree | ef85fb89f8da96dcb8f19c77aabe77f73904695d /test | |
parent | b3a1829bf335a174f3cf799c919d4007c0bfaacb (diff) | |
download | libcss-da22dbf81c7310a5c6195c26922d07652c88392f.tar.gz libcss-da22dbf81c7310a5c6195c26922d07652c88392f.tar.bz2 |
Fix handling of empty strings.
Parse errors in blocks are ignored -- it'll be up to the client to deal with this.
Fix processing of malformed decl-list entries (e.g. foo: bar; !important;)
Fix test driver to calculate remaining length correctly.
svn path=/trunk/libcss/; revision=4849
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) { |