[gtk/matthiasc/for-master] testsuite: Add more css parser tests



commit 970f91ec2408ab2bba9ce182076a168c739370b5
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 31 01:03:14 2020 -0400

    testsuite: Add more css parser tests
    
    Add tests for url parsing.

 testsuite/css/parser/meson.build          | 12 ++++++++++++
 testsuite/css/parser/url-invalid1.css     |  4 ++++
 testsuite/css/parser/url-invalid1.errors  |  1 +
 testsuite/css/parser/url-invalid1.ref.css |  0
 testsuite/css/parser/url-invalid2.css     |  4 ++++
 testsuite/css/parser/url-invalid2.errors  |  1 +
 testsuite/css/parser/url-invalid2.ref.css |  0
 testsuite/css/parser/url-valid1.css       |  3 +++
 testsuite/css/parser/url-valid1.ref.css   |  3 +++
 testsuite/css/parser/url-valid2.css       |  4 ++++
 testsuite/css/parser/url-valid2.ref.css   |  3 +++
 testsuite/css/parser/url-valid3.css       |  4 ++++
 testsuite/css/parser/url-valid3.ref.css   |  3 +++
 13 files changed, 42 insertions(+)
---
diff --git a/testsuite/css/parser/meson.build b/testsuite/css/parser/meson.build
index 6440d43224..7e501aebda 100644
--- a/testsuite/css/parser/meson.build
+++ b/testsuite/css/parser/meson.build
@@ -444,6 +444,18 @@ test_data = [
   'transition.ref.css',
   'transition-timing-function.css',
   'transition-timing-function.ref.css',
+  'url-invalid1.css',
+  'url-invalid1.errors',
+  'url-invalid1.ref.css',
+  'url-invalid2.css',
+  'url-invalid2.errors',
+  'url-invalid2.ref.css',
+  'url-valid1.css',
+  'url-valid1.ref.css',
+  'url-valid2.css',
+  'url-valid2.ref.css',
+  'url-valid3.css',
+  'url-valid3.ref.css',
   'value-inherit.css',
   'value-inherit.ref.css',
   'value-inherit.errors',
diff --git a/testsuite/css/parser/url-invalid1.css b/testsuite/css/parser/url-invalid1.css
new file mode 100644
index 0000000000..903f2dc996
--- /dev/null
+++ b/testsuite/css/parser/url-invalid1.css
@@ -0,0 +1,4 @@
+
+label {
+  background-image: url(resource:///org/gtk/libgtk/icons/16x16(/places/user-trash.png);
+}
diff --git a/testsuite/css/parser/url-invalid1.errors b/testsuite/css/parser/url-invalid1.errors
new file mode 100644
index 0000000000..4fe152bf6e
--- /dev/null
+++ b/testsuite/css/parser/url-invalid1.errors
@@ -0,0 +1 @@
+url-invalid1.css:3:21-87: error: GTK_CSS_PARSER_ERROR_SYNTAX
diff --git a/testsuite/css/parser/url-invalid1.ref.css b/testsuite/css/parser/url-invalid1.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/url-invalid2.css b/testsuite/css/parser/url-invalid2.css
new file mode 100644
index 0000000000..340d29925c
--- /dev/null
+++ b/testsuite/css/parser/url-invalid2.css
@@ -0,0 +1,4 @@
+
+label {
+  background-image: url(resource:///org/gtk/ libgtk/icons/16x16/places/user-trash.png);
+}
diff --git a/testsuite/css/parser/url-invalid2.errors b/testsuite/css/parser/url-invalid2.errors
new file mode 100644
index 0000000000..7978a02772
--- /dev/null
+++ b/testsuite/css/parser/url-invalid2.errors
@@ -0,0 +1 @@
+url-invalid2.css:3:21-87: error: GTK_CSS_PARSER_ERROR_SYNTAX
diff --git a/testsuite/css/parser/url-invalid2.ref.css b/testsuite/css/parser/url-invalid2.ref.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/testsuite/css/parser/url-valid1.css b/testsuite/css/parser/url-valid1.css
new file mode 100644
index 0000000000..c2f1984998
--- /dev/null
+++ b/testsuite/css/parser/url-valid1.css
@@ -0,0 +1,3 @@
+label {
+  background-image: url("resource:///org/gtk/libgtk/icons/16x16/places/user-trash.png");
+}
diff --git a/testsuite/css/parser/url-valid1.ref.css b/testsuite/css/parser/url-valid1.ref.css
new file mode 100644
index 0000000000..e0f30dafeb
--- /dev/null
+++ b/testsuite/css/parser/url-valid1.ref.css
@@ -0,0 +1,3 @@
+label {
+  background-image: none /* FIXME */;
+}
diff --git a/testsuite/css/parser/url-valid2.css b/testsuite/css/parser/url-valid2.css
new file mode 100644
index 0000000000..89f42f16cf
--- /dev/null
+++ b/testsuite/css/parser/url-valid2.css
@@ -0,0 +1,4 @@
+
+label {
+  background-image: url(resource:///org/gtk/libgtk/icons/16x16/places/user-trash.png);
+}
diff --git a/testsuite/css/parser/url-valid2.ref.css b/testsuite/css/parser/url-valid2.ref.css
new file mode 100644
index 0000000000..e0f30dafeb
--- /dev/null
+++ b/testsuite/css/parser/url-valid2.ref.css
@@ -0,0 +1,3 @@
+label {
+  background-image: none /* FIXME */;
+}
diff --git a/testsuite/css/parser/url-valid3.css b/testsuite/css/parser/url-valid3.css
new file mode 100644
index 0000000000..b9add7f7a7
--- /dev/null
+++ b/testsuite/css/parser/url-valid3.css
@@ -0,0 +1,4 @@
+
+label {
+  background-image: url(  resource:///\6F rg/gtk/libgtk/icons/16x16/places/user-trash.png  );
+}
diff --git a/testsuite/css/parser/url-valid3.ref.css b/testsuite/css/parser/url-valid3.ref.css
new file mode 100644
index 0000000000..e0f30dafeb
--- /dev/null
+++ b/testsuite/css/parser/url-valid3.ref.css
@@ -0,0 +1,3 @@
+label {
+  background-image: none /* FIXME */;
+}


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