summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-07-30 23:03:40 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-07-30 23:03:40 +0000
commit8e5933fc5491f95160e7a2417d575d12186c59a1 (patch)
treee25a03ca8db7c9a7097ffb431e4a011dca43fd26 /test
parenta324baae03e4018c2c1aa8e4692505f8fcbe7172 (diff)
downloadlibcss-8e5933fc5491f95160e7a2417d575d12186c59a1.tar.gz
libcss-8e5933fc5491f95160e7a2417d575d12186c59a1.tar.bz2
Implement error recovery for malformed declarations.
svn path=/trunk/libcss/; revision=4826
Diffstat (limited to 'test')
-rw-r--r--test/data/css/INDEX1
-rw-r--r--test/data/css/malformed.css8
2 files changed, 9 insertions, 0 deletions
diff --git a/test/data/css/INDEX b/test/data/css/INDEX
index 4d46ba2..dba60e4 100644
--- a/test/data/css/INDEX
+++ b/test/data/css/INDEX
@@ -5,3 +5,4 @@
simple.css Reasonably simple CSS file (semantically invalid)
allzengarden.css All CSS Zen Garden stylesheets concatenated
blocks.css Basic blocks and at-rule syntax
+malformed.css Malformed declarations from the CSS 2.1 spec
diff --git a/test/data/css/malformed.css b/test/data/css/malformed.css
new file mode 100644
index 0000000..2b36d1c
--- /dev/null
+++ b/test/data/css/malformed.css
@@ -0,0 +1,8 @@
+p { color:green }
+p { color:green; color } /* malformed declaration missing ':', value */
+p { color:red; color; color:green } /* same with expected recovery */
+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 */
+