]> Pileus Git - ~andy/gtk/commitdiff
tests: Add a CSS test for color parsing errors
authorBenjamin Otte <otte@redhat.com>
Mon, 13 Jun 2011 04:25:19 +0000 (06:25 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 13 Jun 2011 13:01:52 +0000 (15:01 +0200)
In [particular check for the fix in the last commit.

tests/css/parser/Makefile.am
tests/css/parser/colors-errors.css [new file with mode: 0644]
tests/css/parser/colors-errors.errors [new file with mode: 0644]
tests/css/parser/colors-errors.ref.css [new file with mode: 0644]

index 6131b016a3b6f64e61b1e1b785fe6e31d60f478e..fc3380c2c2ef1de39e419211c540255bbf61858f 100644 (file)
@@ -37,6 +37,9 @@ EXTRA_DIST += \
        close-at-end-of-file.css \
        close-at-end-of-file.errors \
        close-at-end-of-file.ref.css \
+       colors-errors.css \
+       colors-errors.errors \
+       colors-errors.ref.css \
        colors-red.css \
        colors-red.ref.css \
        css-21-malformed-declarations.css \
diff --git a/tests/css/parser/colors-errors.css b/tests/css/parser/colors-errors.css
new file mode 100644 (file)
index 0000000..4b2cbad
--- /dev/null
@@ -0,0 +1,31 @@
+a {
+  rgba-property: #1;
+}
+
+b {
+  rgba-property: #12;
+}
+
+c {
+  rgba-property: #1234;
+}
+
+d {
+  rgba-property: #12345;
+}
+
+e {
+  rgba-property: #1234567;
+}
+
+f {
+  rgba-property: notacolorname;
+}
+
+g {
+  rgba-property: rgb(1,2,3,4);
+}
+
+h {
+  rgba-property: rgba(1,2,3,4,5);
+}
diff --git a/tests/css/parser/colors-errors.errors b/tests/css/parser/colors-errors.errors
new file mode 100644 (file)
index 0000000..02e9c2b
--- /dev/null
@@ -0,0 +1,8 @@
+colors-errors.css:2: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+colors-errors.css:6: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+colors-errors.css:10: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+colors-errors.css:14: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+colors-errors.css:18: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+colors-errors.css:22: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+colors-errors.css:26: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+colors-errors.css:30: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/tests/css/parser/colors-errors.ref.css b/tests/css/parser/colors-errors.ref.css
new file mode 100644 (file)
index 0000000..e69de29