summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-05-12 18:46:54 -0400
committerMatthias Clasen <mclasen@redhat.com>2023-05-12 19:52:42 -0400
commit0a3dac10c6c9180c54e38025b4bcdd0a91597c80 (patch)
tree06e79dbdd726dee28880628bdc1dddefdbbf7028
parentc9afcd31c2d21b43d1caabcde6acd5bcd6bb675b (diff)
downloadgtk+-0a3dac10c6c9180c54e38025b4bcdd0a91597c80.tar.gz
Improve test coverage for the css parser
-rw-r--r--testsuite/css/parser/font-family.css4
-rw-r--r--testsuite/css/parser/font-family.ref.css4
-rw-r--r--testsuite/css/parser/font-variant.css6
-rw-r--r--testsuite/css/parser/font-variant.ref.css6
-rw-r--r--testsuite/css/parser/font-weight-invalid.css3
-rw-r--r--testsuite/css/parser/font-weight-invalid.errors1
-rw-r--r--testsuite/css/parser/font-weight-invalid.ref.css0
-rw-r--r--testsuite/css/parser/font-weight-invalid1.css3
-rw-r--r--testsuite/css/parser/font-weight-invalid2.css3
-rw-r--r--testsuite/css/parser/font-weight-invalid2.errors1
-rw-r--r--testsuite/css/parser/font-weight-invalid2.ref.css0
-rw-r--r--testsuite/css/parser/meson.build6
12 files changed, 37 insertions, 0 deletions
diff --git a/testsuite/css/parser/font-family.css b/testsuite/css/parser/font-family.css
index 8b9b6c3b96..fbbc82b7c6 100644
--- a/testsuite/css/parser/font-family.css
+++ b/testsuite/css/parser/font-family.css
@@ -21,3 +21,7 @@ e {
f {
font-family: Macaroni, Spaghetti, Sans;
}
+
+g {
+ font-family: Macaroni al dente, Tomato sauce;
+}
diff --git a/testsuite/css/parser/font-family.ref.css b/testsuite/css/parser/font-family.ref.css
index 8ae4644460..92f559c67d 100644
--- a/testsuite/css/parser/font-family.ref.css
+++ b/testsuite/css/parser/font-family.ref.css
@@ -21,3 +21,7 @@ e {
f {
font-family: "Macaroni", "Spaghetti", "Sans";
}
+
+g {
+ font-family: "Macaroni al dente", "Tomato sauce";
+}
diff --git a/testsuite/css/parser/font-variant.css b/testsuite/css/parser/font-variant.css
index d37946b8a0..6cf3ad5bdd 100644
--- a/testsuite/css/parser/font-variant.css
+++ b/testsuite/css/parser/font-variant.css
@@ -17,3 +17,9 @@ d {
e {
font-variant: small-caps;
}
+
+f {
+ font-variant-ligatures: common-ligatures discretionary-ligatures;
+ font-variant-numeric: lining-nums tabular-nums diagonal-fractions;
+ font-variant-east-asian: simplified;
+}
diff --git a/testsuite/css/parser/font-variant.ref.css b/testsuite/css/parser/font-variant.ref.css
index de54b3a446..fa99911a68 100644
--- a/testsuite/css/parser/font-variant.ref.css
+++ b/testsuite/css/parser/font-variant.ref.css
@@ -42,3 +42,9 @@ e {
font-variant-numeric: initial;
font-variant-position: initial;
}
+
+f {
+ font-variant-east-asian: simplified;
+ font-variant-ligatures: common-ligatures discretionary-ligatures;
+ font-variant-numeric: lining-nums tabular-nums diagonal-fractions;
+}
diff --git a/testsuite/css/parser/font-weight-invalid.css b/testsuite/css/parser/font-weight-invalid.css
new file mode 100644
index 0000000000..3196fc1c3d
--- /dev/null
+++ b/testsuite/css/parser/font-weight-invalid.css
@@ -0,0 +1,3 @@
+a {
+ font-weight: 0;
+}
diff --git a/testsuite/css/parser/font-weight-invalid.errors b/testsuite/css/parser/font-weight-invalid.errors
new file mode 100644
index 0000000000..890ceeb398
--- /dev/null
+++ b/testsuite/css/parser/font-weight-invalid.errors
@@ -0,0 +1 @@
+font-weight-invalid.css:2:16-17: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/font-weight-invalid.ref.css b/testsuite/css/parser/font-weight-invalid.ref.css
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/css/parser/font-weight-invalid.ref.css
diff --git a/testsuite/css/parser/font-weight-invalid1.css b/testsuite/css/parser/font-weight-invalid1.css
new file mode 100644
index 0000000000..3196fc1c3d
--- /dev/null
+++ b/testsuite/css/parser/font-weight-invalid1.css
@@ -0,0 +1,3 @@
+a {
+ font-weight: 0;
+}
diff --git a/testsuite/css/parser/font-weight-invalid2.css b/testsuite/css/parser/font-weight-invalid2.css
new file mode 100644
index 0000000000..bead07afcd
--- /dev/null
+++ b/testsuite/css/parser/font-weight-invalid2.css
@@ -0,0 +1,3 @@
+a {
+ font-weight: 1001;
+}
diff --git a/testsuite/css/parser/font-weight-invalid2.errors b/testsuite/css/parser/font-weight-invalid2.errors
new file mode 100644
index 0000000000..b352ddd358
--- /dev/null
+++ b/testsuite/css/parser/font-weight-invalid2.errors
@@ -0,0 +1 @@
+font-weight-invalid2.css:2:16-20: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/font-weight-invalid2.ref.css b/testsuite/css/parser/font-weight-invalid2.ref.css
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/css/parser/font-weight-invalid2.ref.css
diff --git a/testsuite/css/parser/meson.build b/testsuite/css/parser/meson.build
index 7329223235..dab82dc00e 100644
--- a/testsuite/css/parser/meson.build
+++ b/testsuite/css/parser/meson.build
@@ -363,6 +363,12 @@ test_data = [
'font-variant.ref.css',
'font-weight.css',
'font-weight.ref.css',
+ 'font-weight-invalid.css',
+ 'font-weight-invalid.errors',
+ 'font-weight-invalid.ref.css',
+ 'font-weight-invalid2.css',
+ 'font-weight-invalid2.errors',
+ 'font-weight-invalid2.ref.css',
'freed-string-in-error-messages.css',
'freed-string-in-error-messages.errors',
'freed-string-in-error-messages.ref.css',