[gtk+] tests: Add parsing test from the css spec
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Add parsing test from the css spec
- Date: Wed, 18 May 2011 20:30:05 +0000 (UTC)
commit 3f07482b10a08870459e318578b9f4080defd75f
Author: Benjamin Otte <otte redhat com>
Date: Thu Apr 14 17:44:31 2011 +0200
tests: Add parsing test from the css spec
tests/css/parser/Makefile.am | 3 ++
tests/css/parser/css-21-malformed-declarations.css | 7 +++++
.../parser/css-21-malformed-declarations.errors | 6 ++++
.../parser/css-21-malformed-declarations.ref.css | 27 ++++++++++++++++++++
4 files changed, 43 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am
index 62f739f..75cc6cc 100644
--- a/tests/css/parser/Makefile.am
+++ b/tests/css/parser/Makefile.am
@@ -34,6 +34,9 @@ EXTRA_DIST += \
close-at-end-of-file.css \
close-at-end-of-file.errors \
close-at-end-of-file.ref.css \
+ css-21-malformed-declarations.css \
+ css-21-malformed-declarations.errors \
+ css-21-malformed-declarations.ref.css \
declarations.css \
declarations.errors \
declarations.ref.css \
diff --git a/tests/css/parser/css-21-malformed-declarations.css b/tests/css/parser/css-21-malformed-declarations.css
new file mode 100644
index 0000000..7ea0cc6
--- /dev/null
+++ b/tests/css/parser/css-21-malformed-declarations.css
@@ -0,0 +1,7 @@
+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 */
diff --git a/tests/css/parser/css-21-malformed-declarations.errors b/tests/css/parser/css-21-malformed-declarations.errors
new file mode 100644
index 0000000..abff163
--- /dev/null
+++ b/tests/css/parser/css-21-malformed-declarations.errors
@@ -0,0 +1,6 @@
+css-21-malformed-declarations.css:2: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+css-21-malformed-declarations.css:3: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+css-21-malformed-declarations.css:4: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+css-21-malformed-declarations.css:5: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+css-21-malformed-declarations.css:6: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+css-21-malformed-declarations.css:7: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/tests/css/parser/css-21-malformed-declarations.ref.css b/tests/css/parser/css-21-malformed-declarations.ref.css
new file mode 100644
index 0000000..b41216b
--- /dev/null
+++ b/tests/css/parser/css-21-malformed-declarations.ref.css
@@ -0,0 +1,27 @@
+p {
+ color: rgb(0,255,0);
+}
+
+p {
+ color: rgb(0,255,0);
+}
+
+p {
+ color: rgb(0,255,0);
+}
+
+p {
+ color: rgb(0,255,0);
+}
+
+p {
+ color: rgb(0,255,0);
+}
+
+p {
+ color: rgb(0,255,0);
+}
+
+p {
+ color: rgb(0,255,0);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]