[gtk+/parser] tests: Add a test for all selector combination



commit a355170d98f65c233133283f58128758d86eae56
Author: Benjamin Otte <otte redhat com>
Date:   Sun May 15 00:15:25 2011 +0200

    tests: Add a test for all selector combination
    
    The test contains an error where we complain about a duplicate value for
    ":hover:hover"

 tests/css/parser/Makefile.am      |    2 +
 tests/css/parser/selector.css     |  280 +++++++++++++++++++++++++++++++++++++
 tests/css/parser/selector.errors  |    1 +
 tests/css/parser/selector.ref.css |  279 ++++++++++++++++++++++++++++++++++++
 4 files changed, 562 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am
index b3d5f5f..84a2422 100644
--- a/tests/css/parser/Makefile.am
+++ b/tests/css/parser/Makefile.am
@@ -68,4 +68,6 @@ EXTRA_DIST += \
 	integer.ref.css \
 	no-semicolon.css \
 	no-semicolon.ref.css \
+	selector.css \
+	selector.ref.css \
 	simple.css
diff --git a/tests/css/parser/selector.css b/tests/css/parser/selector.css
new file mode 100644
index 0000000..46ac9ca
--- /dev/null
+++ b/tests/css/parser/selector.css
@@ -0,0 +1,280 @@
+* {
+  int-property: 42;
+}
+
+* * {
+  int-property: 42;
+}
+
+* > * {
+  int-property: 42;
+}
+
+* b {
+  int-property: 42;
+}
+
+* > b {
+  int-property: 42;
+}
+
+*.b {
+  int-property: 42;
+}
+
+* .b {
+  int-property: 42;
+}
+
+* > .b {
+  int-property: 42;
+}
+
+*:hover {
+  int-property: 42;
+}
+
+* :hover {
+  int-property: 42;
+}
+
+* > :hover {
+  int-property: 42;
+}
+
+*#b {
+  int-property: 42;
+}
+
+* #b {
+  int-property: 42;
+}
+
+* > #b {
+  int-property: 42;
+}
+
+a {
+  int-property: 42;
+}
+
+a * {
+  int-property: 42;
+}
+
+a > * {
+  int-property: 42;
+}
+
+a b {
+  int-property: 42;
+}
+
+a > b {
+  int-property: 42;
+}
+
+a.b {
+  int-property: 42;
+}
+
+a .b {
+  int-property: 42;
+}
+
+a > .b {
+  int-property: 42;
+}
+
+a:hover {
+  int-property: 42;
+}
+
+a :hover {
+  int-property: 42;
+}
+
+a > :hover {
+  int-property: 42;
+}
+
+a#b {
+  int-property: 42;
+}
+
+a #b {
+  int-property: 42;
+}
+
+a > #b {
+  int-property: 42;
+}
+
+.a {
+  int-property: 42;
+}
+
+.a * {
+  int-property: 42;
+}
+
+.a > * {
+  int-property: 42;
+}
+
+.a b {
+  int-property: 42;
+}
+
+.a > b {
+  int-property: 42;
+}
+
+.a.b {
+  int-property: 42;
+}
+
+.a .b {
+  int-property: 42;
+}
+
+.a > .b {
+  int-property: 42;
+}
+
+.a:hover {
+  int-property: 42;
+}
+
+.a :hover {
+  int-property: 42;
+}
+
+.a > :hover {
+  int-property: 42;
+}
+
+.a#b {
+  int-property: 42;
+}
+
+.a #b {
+  int-property: 42;
+}
+
+.a > #b {
+  int-property: 42;
+}
+
+:hover {
+  int-property: 42;
+}
+
+:hover * {
+  int-property: 42;
+}
+
+:hover > * {
+  int-property: 42;
+}
+
+:hover b {
+  int-property: 42;
+}
+
+:hover > b {
+  int-property: 42;
+}
+
+:hover.b {
+  int-property: 42;
+}
+
+:hover .b {
+  int-property: 42;
+}
+
+:hover > .b {
+  int-property: 42;
+}
+
+:hover:hover {
+  int-property: 42;
+}
+
+:hover :hover {
+  int-property: 42;
+}
+
+:hover > :hover {
+  int-property: 42;
+}
+
+:hover#b {
+  int-property: 42;
+}
+
+:hover #b {
+  int-property: 42;
+}
+
+:hover > #b {
+  int-property: 42;
+}
+
+#a {
+  int-property: 42;
+}
+
+#a * {
+  int-property: 42;
+}
+
+#a > * {
+  int-property: 42;
+}
+
+#a b {
+  int-property: 42;
+}
+
+#a > b {
+  int-property: 42;
+}
+
+#a.b {
+  int-property: 42;
+}
+
+#a .b {
+  int-property: 42;
+}
+
+#a > .b {
+  int-property: 42;
+}
+
+#a:hover {
+  int-property: 42;
+}
+
+#a :hover {
+  int-property: 42;
+}
+
+#a > :hover {
+  int-property: 42;
+}
+
+#a#b {
+  int-property: 42;
+}
+
+#a #b {
+  int-property: 42;
+}
+
+#a > #b {
+  int-property: 42;
+}
+
diff --git a/tests/css/parser/selector.errors b/tests/css/parser/selector.errors
new file mode 100644
index 0000000..42cc16e
--- /dev/null
+++ b/tests/css/parser/selector.errors
@@ -0,0 +1 @@
+selector.css:201: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/tests/css/parser/selector.ref.css b/tests/css/parser/selector.ref.css
new file mode 100644
index 0000000..37ba16a
--- /dev/null
+++ b/tests/css/parser/selector.ref.css
@@ -0,0 +1,279 @@
+* {
+  int-property: 42;
+}
+
+* * {
+  int-property: 42;
+}
+
+* > * {
+  int-property: 42;
+}
+
+* b {
+  int-property: 42;
+}
+
+* > b {
+  int-property: 42;
+}
+
+a {
+  int-property: 42;
+}
+
+a * {
+  int-property: 42;
+}
+
+a > * {
+  int-property: 42;
+}
+
+a b {
+  int-property: 42;
+}
+
+a > b {
+  int-property: 42;
+}
+
+.b {
+  int-property: 42;
+}
+
+* .b {
+  int-property: 42;
+}
+
+* > .b {
+  int-property: 42;
+}
+
+:hover {
+  int-property: 42;
+}
+
+* :hover {
+  int-property: 42;
+}
+
+* > :hover {
+  int-property: 42;
+}
+
+.a {
+  int-property: 42;
+}
+
+.a * {
+  int-property: 42;
+}
+
+.a > * {
+  int-property: 42;
+}
+
+:hover {
+  int-property: 42;
+}
+
+:hover * {
+  int-property: 42;
+}
+
+:hover > * {
+  int-property: 42;
+}
+
+:hover {
+  int-property: 42;
+}
+
+a.b {
+  int-property: 42;
+}
+
+a .b {
+  int-property: 42;
+}
+
+a > .b {
+  int-property: 42;
+}
+
+a:hover {
+  int-property: 42;
+}
+
+a :hover {
+  int-property: 42;
+}
+
+a > :hover {
+  int-property: 42;
+}
+
+.a b {
+  int-property: 42;
+}
+
+.a > b {
+  int-property: 42;
+}
+
+:hover b {
+  int-property: 42;
+}
+
+:hover > b {
+  int-property: 42;
+}
+
+.a.b {
+  int-property: 42;
+}
+
+.a .b {
+  int-property: 42;
+}
+
+.a > .b {
+  int-property: 42;
+}
+
+.a:hover {
+  int-property: 42;
+}
+
+.a :hover {
+  int-property: 42;
+}
+
+.a > :hover {
+  int-property: 42;
+}
+
+.b:hover {
+  int-property: 42;
+}
+
+:hover .b {
+  int-property: 42;
+}
+
+:hover > .b {
+  int-property: 42;
+}
+
+:hover :hover {
+  int-property: 42;
+}
+
+:hover > :hover {
+  int-property: 42;
+}
+
+#b {
+  int-property: 42;
+}
+
+* #b {
+  int-property: 42;
+}
+
+* > #b {
+  int-property: 42;
+}
+
+#a {
+  int-property: 42;
+}
+
+#a * {
+  int-property: 42;
+}
+
+#a > * {
+  int-property: 42;
+}
+
+a#b {
+  int-property: 42;
+}
+
+a #b {
+  int-property: 42;
+}
+
+a > #b {
+  int-property: 42;
+}
+
+#a b {
+  int-property: 42;
+}
+
+#a > b {
+  int-property: 42;
+}
+
+#b.a {
+  int-property: 42;
+}
+
+.a #b {
+  int-property: 42;
+}
+
+.a > #b {
+  int-property: 42;
+}
+
+#b:hover {
+  int-property: 42;
+}
+
+:hover #b {
+  int-property: 42;
+}
+
+:hover > #b {
+  int-property: 42;
+}
+
+#a.b {
+  int-property: 42;
+}
+
+#a .b {
+  int-property: 42;
+}
+
+#a > .b {
+  int-property: 42;
+}
+
+#a:hover {
+  int-property: 42;
+}
+
+#a :hover {
+  int-property: 42;
+}
+
+#a > :hover {
+  int-property: 42;
+}
+
+#a#b {
+  int-property: 42;
+}
+
+#a #b {
+  int-property: 42;
+}
+
+#a > #b {
+  int-property: 42;
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]