[gtk+] 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+] tests: Add a test to ensure we handle unknown pseudo-classes correctly
- Date: Wed, 18 May 2011 20:30:45 +0000 (UTC)
commit 174cfff50f1026b3ecc7ae0f14d8d360523bf2a1
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]