Improve test coverage for the css parser
authorMatthias Clasen <mclasen@redhat.com>
Fri, 12 May 2023 22:46:54 +0000 (18:46 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 12 May 2023 23:52:42 +0000 (19:52 -0400)
12 files changed:
testsuite/css/parser/font-family.css
testsuite/css/parser/font-family.ref.css
testsuite/css/parser/font-variant.css
testsuite/css/parser/font-variant.ref.css
testsuite/css/parser/font-weight-invalid.css [new file with mode: 0644]
testsuite/css/parser/font-weight-invalid.errors [new file with mode: 0644]
testsuite/css/parser/font-weight-invalid.ref.css [new file with mode: 0644]
testsuite/css/parser/font-weight-invalid1.css [new file with mode: 0644]
testsuite/css/parser/font-weight-invalid2.css [new file with mode: 0644]
testsuite/css/parser/font-weight-invalid2.errors [new file with mode: 0644]
testsuite/css/parser/font-weight-invalid2.ref.css [new file with mode: 0644]
testsuite/css/parser/meson.build

index 8b9b6c3b9674031813965695a9a817a0a46e1e75..fbbc82b7c69406eefceefd06d6f4a61de84c0a3f 100644 (file)
@@ -21,3 +21,7 @@ e {
 f {
   font-family: Macaroni, Spaghetti, Sans;
 }
+
+g {
+  font-family: Macaroni al dente, Tomato sauce;
+}
index 8ae4644460f1030ea967371bfa72ed761ed39d53..92f559c67df0f478581a1001deeeea5f71dd8e66 100644 (file)
@@ -21,3 +21,7 @@ e {
 f {
   font-family: "Macaroni", "Spaghetti", "Sans";
 }
+
+g {
+  font-family: "Macaroni al dente", "Tomato sauce";
+}
index d37946b8a09d936af6a03ac775707e98ec58eab3..6cf3ad5bdd9722041e2d08a69abe46c7e98bba8e 100644 (file)
@@ -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;
+}
index de54b3a4469818492b5a550d9990e88f22a57cf2..fa99911a6885c4f3059cafdbd249decdc50814a4 100644 (file)
@@ -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 (file)
index 0000000..3196fc1
--- /dev/null
@@ -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 (file)
index 0000000..890ceeb
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/testsuite/css/parser/font-weight-invalid1.css b/testsuite/css/parser/font-weight-invalid1.css
new file mode 100644 (file)
index 0000000..3196fc1
--- /dev/null
@@ -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 (file)
index 0000000..bead07a
--- /dev/null
@@ -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 (file)
index 0000000..b352ddd
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
index 7329223235e354b4567963c2801ca6cfa37c8761..dab82dc00e409df974b94404cd1b50a2718b7037 100644 (file)
@@ -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',