From: Matthias Clasen Date: Fri, 12 May 2023 22:46:54 +0000 (-0400) Subject: Improve test coverage for the css parser X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~269^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0a3dac10c6c9180c54e38025b4bcdd0a91597c80;p=gtk4.git Improve test coverage for the css parser --- 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 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 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',