[gtk+] tests: Add tests for cyclic imports



commit c7ef2225b715be42f3f025e127088ca857914799
Author: Benjamin Otte <otte redhat com>
Date:   Tue Apr 12 04:34:02 2011 +0200

    tests: Add tests for cyclic imports

 tests/css/parser/Makefile.am             |    9 +++++++++
 tests/css/parser/import-cyclic-1.css     |    5 +++++
 tests/css/parser/import-cyclic-1.errors  |    1 +
 tests/css/parser/import-cyclic-1.ref.css |   11 +++++++++++
 tests/css/parser/import-cyclic-2.css     |    5 +++++
 tests/css/parser/import-cyclic-2.errors  |    1 +
 tests/css/parser/import-cyclic-2.ref.css |   11 +++++++++++
 tests/css/parser/import-cyclic-3.css     |    5 +++++
 tests/css/parser/import-cyclic-3.errors  |    1 +
 tests/css/parser/import-cyclic-3.ref.css |   11 +++++++++++
 10 files changed, 60 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am
index c9e75eb..94b9f9b 100644
--- a/tests/css/parser/Makefile.am
+++ b/tests/css/parser/Makefile.am
@@ -40,6 +40,15 @@ EXTRA_DIST += \
 	does-not-exist.css \
 	does-not-exist.errors \
 	does-not-exist.ref.css \
+	import-cyclic-1.css \
+	import-cyclic-1.errors \
+	import-cyclic-1.ref.css \
+	import-cyclic-2.css \
+	import-cyclic-2.errors \
+	import-cyclic-2.ref.css \
+	import-cyclic-3.css \
+	import-cyclic-3.errors \
+	import-cyclic-3.ref.css \
 	import-recursive.css \
 	import-recursive.errors \
 	import-recursive.ref.css \
diff --git a/tests/css/parser/import-cyclic-1.css b/tests/css/parser/import-cyclic-1.css
new file mode 100644
index 0000000..b5182e5
--- /dev/null
+++ b/tests/css/parser/import-cyclic-1.css
@@ -0,0 +1,5 @@
+ import url("import-cyclic-2.css");
+
+a {
+  int-property: 1
+}
diff --git a/tests/css/parser/import-cyclic-1.errors b/tests/css/parser/import-cyclic-1.errors
new file mode 100644
index 0000000..988cfcb
--- /dev/null
+++ b/tests/css/parser/import-cyclic-1.errors
@@ -0,0 +1 @@
+import-cyclic-3.css:1: error: GTK_CSS_PROVIDER_ERROR_IMPORT
diff --git a/tests/css/parser/import-cyclic-1.ref.css b/tests/css/parser/import-cyclic-1.ref.css
new file mode 100644
index 0000000..9be1136
--- /dev/null
+++ b/tests/css/parser/import-cyclic-1.ref.css
@@ -0,0 +1,11 @@
+a {
+  int-property: 3;
+}
+
+a {
+  int-property: 2;
+}
+
+a {
+  int-property: 1;
+}
diff --git a/tests/css/parser/import-cyclic-2.css b/tests/css/parser/import-cyclic-2.css
new file mode 100644
index 0000000..c34a0fe
--- /dev/null
+++ b/tests/css/parser/import-cyclic-2.css
@@ -0,0 +1,5 @@
+ import url("import-cyclic-3.css");
+
+a {
+  int-property: 2
+}
diff --git a/tests/css/parser/import-cyclic-2.errors b/tests/css/parser/import-cyclic-2.errors
new file mode 100644
index 0000000..dac7dad
--- /dev/null
+++ b/tests/css/parser/import-cyclic-2.errors
@@ -0,0 +1 @@
+import-cyclic-1.css:1: error: GTK_CSS_PROVIDER_ERROR_IMPORT
diff --git a/tests/css/parser/import-cyclic-2.ref.css b/tests/css/parser/import-cyclic-2.ref.css
new file mode 100644
index 0000000..ba2f6aa
--- /dev/null
+++ b/tests/css/parser/import-cyclic-2.ref.css
@@ -0,0 +1,11 @@
+a {
+  int-property: 1;
+}
+
+a {
+  int-property: 3;
+}
+
+a {
+  int-property: 2;
+}
diff --git a/tests/css/parser/import-cyclic-3.css b/tests/css/parser/import-cyclic-3.css
new file mode 100644
index 0000000..84fb447
--- /dev/null
+++ b/tests/css/parser/import-cyclic-3.css
@@ -0,0 +1,5 @@
+ import url("import-cyclic-1.css");
+
+a {
+  int-property: 3
+}
diff --git a/tests/css/parser/import-cyclic-3.errors b/tests/css/parser/import-cyclic-3.errors
new file mode 100644
index 0000000..4a0087a
--- /dev/null
+++ b/tests/css/parser/import-cyclic-3.errors
@@ -0,0 +1 @@
+import-cyclic-2.css:1: error: GTK_CSS_PROVIDER_ERROR_IMPORT
diff --git a/tests/css/parser/import-cyclic-3.ref.css b/tests/css/parser/import-cyclic-3.ref.css
new file mode 100644
index 0000000..d15ce3d
--- /dev/null
+++ b/tests/css/parser/import-cyclic-3.ref.css
@@ -0,0 +1,11 @@
+a {
+  int-property: 2;
+}
+
+a {
+  int-property: 1;
+}
+
+a {
+  int-property: 3;
+}



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