[gtk/css-line-height2: 80/87] css: Add parser tests for line-height




commit d90943a854d24cd027571eee69cd3ab3d15ddafa
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 7 18:04:16 2021 -0400

    css: Add parser tests for line-height

 testsuite/css/parser/line-height-invalid1.css     |  3 +++
 testsuite/css/parser/line-height-invalid1.errors  |  1 +
 testsuite/css/parser/line-height-invalid1.ref.css |  0
 testsuite/css/parser/line-height-invalid2.css     |  3 +++
 testsuite/css/parser/line-height-invalid2.errors  |  1 +
 testsuite/css/parser/line-height-invalid2.ref.css |  0
 testsuite/css/parser/line-height-invalid3.css     |  3 +++
 testsuite/css/parser/line-height-invalid3.errors  |  1 +
 testsuite/css/parser/line-height-invalid3.ref.css |  0
 testsuite/css/parser/line-height.css              | 27 +++++++++++++++++++++++
 testsuite/css/parser/line-height.ref.css          | 27 +++++++++++++++++++++++
 testsuite/css/parser/meson.build                  | 11 +++++++++
 12 files changed, 77 insertions(+)
---
diff --git a/testsuite/css/parser/line-height-invalid1.css b/testsuite/css/parser/line-height-invalid1.css
new file mode 100644
index 0000000000..6183e6b6d5
--- /dev/null
+++ b/testsuite/css/parser/line-height-invalid1.css
@@ -0,0 +1,3 @@
+a {
+  line-height: -1;
+}
diff --git a/testsuite/css/parser/line-height-invalid1.errors 
b/testsuite/css/parser/line-height-invalid1.errors
new file mode 100644
index 0000000000..e40c3d0898
--- /dev/null
+++ b/testsuite/css/parser/line-height-invalid1.errors
@@ -0,0 +1 @@
+line-height-invalid1.css:2:16-18: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/line-height-invalid1.ref.css 
b/testsuite/css/parser/line-height-invalid1.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/line-height-invalid2.css b/testsuite/css/parser/line-height-invalid2.css
new file mode 100644
index 0000000000..91648638b2
--- /dev/null
+++ b/testsuite/css/parser/line-height-invalid2.css
@@ -0,0 +1,3 @@
+a {
+  line-height: -200%;
+}
diff --git a/testsuite/css/parser/line-height-invalid2.errors 
b/testsuite/css/parser/line-height-invalid2.errors
new file mode 100644
index 0000000000..5e2ae77633
--- /dev/null
+++ b/testsuite/css/parser/line-height-invalid2.errors
@@ -0,0 +1 @@
+line-height-invalid2.css:2:16-21: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/line-height-invalid2.ref.css 
b/testsuite/css/parser/line-height-invalid2.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/line-height-invalid3.css b/testsuite/css/parser/line-height-invalid3.css
new file mode 100644
index 0000000000..ecb2fe290c
--- /dev/null
+++ b/testsuite/css/parser/line-height-invalid3.css
@@ -0,0 +1,3 @@
+a {
+  line-height: -2em;
+}
diff --git a/testsuite/css/parser/line-height-invalid3.errors 
b/testsuite/css/parser/line-height-invalid3.errors
new file mode 100644
index 0000000000..d4e0dcab75
--- /dev/null
+++ b/testsuite/css/parser/line-height-invalid3.errors
@@ -0,0 +1 @@
+line-height-invalid3.css:2:16-20: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
diff --git a/testsuite/css/parser/line-height-invalid3.ref.css 
b/testsuite/css/parser/line-height-invalid3.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/line-height.css b/testsuite/css/parser/line-height.css
new file mode 100644
index 0000000000..66a6b5f784
--- /dev/null
+++ b/testsuite/css/parser/line-height.css
@@ -0,0 +1,27 @@
+a {
+  line-height: initial;
+}
+
+b {
+  line-height: inherit;
+}
+
+c {
+  line-height: unset;
+}
+
+d {
+  line-height: normal;
+}
+
+e {
+  line-height: 1.5;
+}
+
+f {
+  line-height: 200%;
+}
+
+g {
+  line-height: 2em;
+}
diff --git a/testsuite/css/parser/line-height.ref.css b/testsuite/css/parser/line-height.ref.css
new file mode 100644
index 0000000000..66a6b5f784
--- /dev/null
+++ b/testsuite/css/parser/line-height.ref.css
@@ -0,0 +1,27 @@
+a {
+  line-height: initial;
+}
+
+b {
+  line-height: inherit;
+}
+
+c {
+  line-height: unset;
+}
+
+d {
+  line-height: normal;
+}
+
+e {
+  line-height: 1.5;
+}
+
+f {
+  line-height: 200%;
+}
+
+g {
+  line-height: 2em;
+}
diff --git a/testsuite/css/parser/meson.build b/testsuite/css/parser/meson.build
index e161d48835..9f5dd0673f 100644
--- a/testsuite/css/parser/meson.build
+++ b/testsuite/css/parser/meson.build
@@ -384,6 +384,17 @@ test_data = [
   'letter-spacing.ref.css',
   'linear-gradient.css',
   'linear-gradient.ref.css',
+  'line-height.css',
+  'line-height.ref.css',
+  'line-height-invalid1.css',
+  'line-height-invalid1.errors',
+  'line-height-invalid1.ref.css',
+  'line-height-invalid2.css',
+  'line-height-invalid2.errors',
+  'line-height-invalid2.ref.css',
+  'line-height-invalid3.css',
+  'line-height-invalid3.errors',
+  'line-height-invalid3.ref.css',
   'margin.css',
   'margin.ref.css',
   'min-height.css',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]