[gtk+/parser] tests: Add a test to ensure we handle unknown pseudo-classes correctly
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/parser] tests: Add a test to ensure we handle unknown pseudo-classes correctly
- Date: Sun, 15 May 2011 13:58:25 +0000 (UTC)
commit f901719f915f8941fa35de932f3ae8bb1e321cb2
Author: Benjamin Otte <otte redhat com>
Date: Sun May 15 00:17:04 2011 +0200
tests: Add a test to ensure we handle unknown pseudo-classes correctly
1) We want to throw an unknown value
2) We want to skip the whole rule
tests/css/parser/Makefile.am | 3 +++
tests/css/parser/pseudo-classes-unknown.css | 23 +++++++++++++++++++++++
tests/css/parser/pseudo-classes-unknown.errors | 6 ++++++
3 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am
index 84a2422..9ffd437 100644
--- a/tests/css/parser/Makefile.am
+++ b/tests/css/parser/Makefile.am
@@ -68,6 +68,9 @@ EXTRA_DIST += \
integer.ref.css \
no-semicolon.css \
no-semicolon.ref.css \
+ pseudo-classes-unknown.css \
+ pseudo-classes-unknown.errors \
+ pseudo-classes-unknown.ref.css \
selector.css \
selector.ref.css \
simple.css
diff --git a/tests/css/parser/pseudo-classes-unknown.css b/tests/css/parser/pseudo-classes-unknown.css
new file mode 100644
index 0000000..fa82e7d
--- /dev/null
+++ b/tests/css/parser/pseudo-classes-unknown.css
@@ -0,0 +1,23 @@
+:nobody-knows-me {
+ int-property: 42;
+}
+
+:nobody-knows-me(really) {
+ int-property: 42;
+}
+
+:a:lot:of:unkwnown:pseudo:classes(some):of(them):with:functions( spaces ) {
+ int-property: 42;
+}
+
+:nth-child {
+ int-property: 42;
+}
+
+:nth-child() {
+ int-property: 42;
+}
+
+x, :unknown-pseudo-classes-invalidate-selectors, y {
+ int-property: 42;
+}
diff --git a/tests/css/parser/pseudo-classes-unknown.errors b/tests/css/parser/pseudo-classes-unknown.errors
new file mode 100644
index 0000000..18b9885
--- /dev/null
+++ b/tests/css/parser/pseudo-classes-unknown.errors
@@ -0,0 +1,6 @@
+pseudo-classes-unknown.css:1: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE
+pseudo-classes-unknown.css:5: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE
+pseudo-classes-unknown.css:9: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE
+pseudo-classes-unknown.css:13: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE
+pseudo-classes-unknown.css:17: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE
+pseudo-classes-unknown.css:21: error: GTK_CSS_PROVIDER_ERROR_UNKNOWN_VALUE
diff --git a/tests/css/parser/pseudo-classes-unknown.ref.css b/tests/css/parser/pseudo-classes-unknown.ref.css
new file mode 100644
index 0000000..e69de29
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]