tests: Add parsing test from the css spec

This commit is contained in:
Benjamin Otte 2011-04-14 17:44:31 +02:00
parent 2b807e574d
commit 3f07482b10
4 changed files with 43 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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