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
This commit is contained in:
Benjamin Otte 2011-05-15 00:17:04 +02:00
parent e7aa125eb0
commit 174cfff50f
4 changed files with 32 additions and 0 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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