[gtk+] tests: Add a CSS test for color parsing errors



commit f4a6ef0d50864313f296a10ce3c93275e32a86b6
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jun 13 06:25:19 2011 +0200

    tests: Add a CSS test for color parsing errors
    
    In [particular check for the fix in the last commit.

 tests/css/parser/Makefile.am           |    3 +++
 tests/css/parser/colors-errors.css     |   31 +++++++++++++++++++++++++++++++
 tests/css/parser/colors-errors.errors  |    8 ++++++++
 3 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am
index 6131b01..fc3380c 100644
--- a/tests/css/parser/Makefile.am
+++ b/tests/css/parser/Makefile.am
@@ -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
index 0000000..4b2cbad
--- /dev/null
+++ b/tests/css/parser/colors-errors.css
@@ -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
index 0000000..02e9c2b
--- /dev/null
+++ b/tests/css/parser/colors-errors.errors
@@ -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
index 0000000..e69de29



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