summaryrefslogtreecommitdiff
path: root/test/data/parse
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-13 18:02:43 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-13 18:02:43 +0000
commit3ba0934ed0722b1021acc8bda47b4c66e1914ab9 (patch)
tree48694d65785c52cfd53cb5dd3f54253c677c53ea /test/data/parse
parent0607ee68e853b54e9e9beee8995b13c6dd07f0e5 (diff)
downloadlibcss-3ba0934ed0722b1021acc8bda47b4c66e1914ab9.tar.gz
libcss-3ba0934ed0722b1021acc8bda47b4c66e1914ab9.tar.bz2
More selector tests.
svn path=/trunk/libcss/; revision=6056
Diffstat (limited to 'test/data/parse')
-rw-r--r--test/data/parse/selectors.dat181
1 files changed, 181 insertions, 0 deletions
diff --git a/test/data/parse/selectors.dat b/test/data/parse/selectors.dat
index 46788c8..5c69f27 100644
--- a/test/data/parse/selectors.dat
+++ b/test/data/parse/selectors.dat
@@ -1,3 +1,5 @@
+## Simple selectors & basic combinators
+
#data
* {}
#errors
@@ -138,3 +140,182 @@ E#myid {}
| 1 #myid
#reset
+## Multiple specifics in simple selectors
+
+#data
+foo.bar#baz {}
+#errors
+#expected
+| 1 foo.bar#baz
+#reset
+
+#data
+[bar="baz"][foo|="bar"] {}
+#errors
+#expected
+| 1 [bar="baz"][foo|="bar"]
+#reset
+
+#data
+.foo[bar~="baz"] {}
+#errors
+#expected
+| 1 .foo[bar~="baz"]
+#reset
+
+#data
+#myid:link:before {}
+#errors
+#expected
+| 1 #myid:link:before
+#reset
+
+#data
+.class:lang(c):after {}
+#errors
+#expected
+| 1 .class:lang(c):after
+#reset
+
+#data
+.class:lang(c) > #myid:before {}
+#errors
+#expected
+| 1 .class:lang(c) > #myid:before
+#reset
+
+## Multiple selectors in a rule
+
+#data
+foo,bar {}
+#errors
+#expected
+| 1 foo, bar
+#reset
+
+#data
+E>F,bar {}
+#errors
+#expected
+| 1 E > F, bar
+#reset
+
+#data
+E+F,bar {}
+#errors
+#expected
+| 1 E + F, bar
+#reset
+
+#data
+E F,bar {}
+#errors
+#expected
+| 1 E F, bar
+#reset
+
+#data
+E:first-child,bar {}
+#errors
+#expected
+| 1 E:first-child, bar
+#reset
+
+#data
+E:link,bar {}
+#errors
+#expected
+| 1 E:link, bar
+#reset
+
+#data
+E:visited,bar {}
+#errors
+#expected
+| 1 E:visited, bar
+#reset
+
+#data
+E:active,bar {}
+#errors
+#expected
+| 1 E:active, bar
+#reset
+
+#data
+E:hover,bar {}
+#errors
+#expected
+| 1 E:hover, bar
+#reset
+
+#data
+E:focus,bar {}
+#errors
+#expected
+| 1 E:focus, bar
+#reset
+
+#data
+E:lang(c),bar {}
+#errors
+#expected
+| 1 E:lang(c), bar
+#reset
+
+#data
+E[foo],bar {}
+#errors
+#expected
+| 1 E[foo], bar
+#reset
+
+#data
+E[foo="warning"],bar {}
+#errors
+#expected
+| 1 E[foo="warning"], bar
+#reset
+
+#data
+E[foo~="warning"],bar {}
+#errors
+#expected
+| 1 E[foo~="warning"], bar
+#reset
+
+#data
+E[lang|="en"],bar {}
+#errors
+#expected
+| 1 E[lang|="en"], bar
+#reset
+
+#data
+DIV.warning,bar {}
+#errors
+#expected
+| 1 DIV.warning, bar
+#reset
+
+#data
+.warning,bar {}
+#errors
+#expected
+| 1 .warning, bar
+#reset
+
+#data
+E#myid,bar {}
+#errors
+#expected
+| 1 E#myid, bar
+#reset
+
+#data
+#myid,bar {}
+#errors
+#expected
+| 1 #myid, bar
+#reset
+