Add some more GMarkup tests
authorMatthias Clasen <mclasen@redhat.com>
Thu, 6 Oct 2011 13:01:24 +0000 (09:01 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 8 Oct 2011 23:02:06 +0000 (19:02 -0400)
24 files changed:
glib/tests/markups/fail-41.expected [new file with mode: 0644]
glib/tests/markups/fail-41.gmarkup [new file with mode: 0644]
glib/tests/markups/fail-42.expected [new file with mode: 0644]
glib/tests/markups/fail-42.gmarkup [new file with mode: 0644]
glib/tests/markups/fail-43.expected [new file with mode: 0644]
glib/tests/markups/fail-43.gmarkup [new file with mode: 0644]
glib/tests/markups/fail-44.expected [new file with mode: 0644]
glib/tests/markups/fail-44.gmarkup [new file with mode: 0644]
glib/tests/markups/fail-45.expected [new file with mode: 0644]
glib/tests/markups/fail-45.gmarkup [new file with mode: 0644]
glib/tests/markups/fail-46.expected [new file with mode: 0644]
glib/tests/markups/fail-46.gmarkup [new file with mode: 0644]
glib/tests/markups/fail-47.expected [new file with mode: 0644]
glib/tests/markups/fail-47.gmarkup [new file with mode: 0644]
glib/tests/markups/fail-48.expected [new file with mode: 0644]
glib/tests/markups/fail-48.gmarkup [new file with mode: 0644]
glib/tests/markups/fail-49.expected [new file with mode: 0644]
glib/tests/markups/fail-49.gmarkup [new file with mode: 0644]
glib/tests/markups/valid-12.expected [new file with mode: 0644]
glib/tests/markups/valid-12.gmarkup [new file with mode: 0644]
glib/tests/markups/valid-13.expected [new file with mode: 0644]
glib/tests/markups/valid-13.gmarkup [new file with mode: 0644]
glib/tests/markups/valid-14.expected [new file with mode: 0644]
glib/tests/markups/valid-14.gmarkup [new file with mode: 0644]

diff --git a/glib/tests/markups/fail-41.expected b/glib/tests/markups/fail-41.expected
new file mode 100644 (file)
index 0000000..ab476ef
--- /dev/null
@@ -0,0 +1 @@
+ERROR Error on line 2 char 1: Invalid UTF-8 encoded text in name - not valid 'abcäöü'
diff --git a/glib/tests/markups/fail-41.gmarkup b/glib/tests/markups/fail-41.gmarkup
new file mode 100644 (file)
index 0000000..04780b4
--- /dev/null
@@ -0,0 +1,3 @@
+<abcäöü>
+abcäöü
+</abcäöü>
diff --git a/glib/tests/markups/fail-42.expected b/glib/tests/markups/fail-42.expected
new file mode 100644 (file)
index 0000000..4fbf685
--- /dev/null
@@ -0,0 +1 @@
+ERROR Error on line 3: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity - escape ampersand as &amp;
diff --git a/glib/tests/markups/fail-42.gmarkup b/glib/tests/markups/fail-42.gmarkup
new file mode 100644 (file)
index 0000000..51e71b1
--- /dev/null
@@ -0,0 +1,5 @@
+<foo bar="ab
+cd
+&lt
+de
+fg"></foo>
diff --git a/glib/tests/markups/fail-43.expected b/glib/tests/markups/fail-43.expected
new file mode 100644 (file)
index 0000000..57a7b02
--- /dev/null
@@ -0,0 +1 @@
+ERROR Error on line 1 char 10: Odd character '≈', expected a '=' after attribute name 'bar' of element 'foo'
diff --git a/glib/tests/markups/fail-43.gmarkup b/glib/tests/markups/fail-43.gmarkup
new file mode 100644 (file)
index 0000000..c247c71
--- /dev/null
@@ -0,0 +1 @@
+<foo bar ≈"baz"></foo>
diff --git a/glib/tests/markups/fail-44.expected b/glib/tests/markups/fail-44.expected
new file mode 100644 (file)
index 0000000..2548050
--- /dev/null
@@ -0,0 +1,3 @@
+ELEMENT 'foo'
+END 'foo'
+ERROR Error on line 1 char 6: Odd character '≻', expected a '>' character to end the empty-element tag 'foo'
diff --git a/glib/tests/markups/fail-44.gmarkup b/glib/tests/markups/fail-44.gmarkup
new file mode 100644 (file)
index 0000000..f6217db
--- /dev/null
@@ -0,0 +1 @@
+<foo/≻
diff --git a/glib/tests/markups/fail-45.expected b/glib/tests/markups/fail-45.expected
new file mode 100644 (file)
index 0000000..866b751
--- /dev/null
@@ -0,0 +1,3 @@
+ELEMENT 'foo'
+  TEXT ''
+ERROR Error on line 1 char 12: '≻' is not a valid character following the close element name 'foo'; the allowed character is '>'
diff --git a/glib/tests/markups/fail-45.gmarkup b/glib/tests/markups/fail-45.gmarkup
new file mode 100644 (file)
index 0000000..4183291
--- /dev/null
@@ -0,0 +1 @@
+<foo></foo ≻
diff --git a/glib/tests/markups/fail-46.expected b/glib/tests/markups/fail-46.expected
new file mode 100644 (file)
index 0000000..f3ab8ca
--- /dev/null
@@ -0,0 +1,2 @@
+ELEMENT 'foo'
+ERROR Error on line 3 char 2: Document ended unexpectedly with elements still open - 'foo' was the last element opened
diff --git a/glib/tests/markups/fail-46.gmarkup b/glib/tests/markups/fail-46.gmarkup
new file mode 100644 (file)
index 0000000..36daef4
--- /dev/null
@@ -0,0 +1,2 @@
+<foo>
+abc
diff --git a/glib/tests/markups/fail-47.expected b/glib/tests/markups/fail-47.expected
new file mode 100644 (file)
index 0000000..89dc4b4
--- /dev/null
@@ -0,0 +1 @@
+ERROR Error on line 1: Failed to parse '', which should have been a digit inside a character reference (&#234; for example) - perhaps the digit is too large
diff --git a/glib/tests/markups/fail-47.gmarkup b/glib/tests/markups/fail-47.gmarkup
new file mode 100644 (file)
index 0000000..bbe8179
--- /dev/null
@@ -0,0 +1 @@
+<foo bar="&#𝐀;"></foo>
diff --git a/glib/tests/markups/fail-48.expected b/glib/tests/markups/fail-48.expected
new file mode 100644 (file)
index 0000000..e5fa740
--- /dev/null
@@ -0,0 +1 @@
+ERROR Error on line 2 char 2: Odd character '>', expected a '=' after attribute name 'bar' of element 'fail'
diff --git a/glib/tests/markups/fail-48.gmarkup b/glib/tests/markups/fail-48.gmarkup
new file mode 100644 (file)
index 0000000..fcbeab6
--- /dev/null
@@ -0,0 +1,2 @@
+<fail foo="foo" bar
+></foo>
diff --git a/glib/tests/markups/fail-49.expected b/glib/tests/markups/fail-49.expected
new file mode 100644 (file)
index 0000000..fc3bacb
--- /dev/null
@@ -0,0 +1,3 @@
+ELEMENT 'foo'
+  TEXT ''
+ERROR Error on line 2 char 2: Document ended unexpectedly inside the close tag for element 'foo'
diff --git a/glib/tests/markups/fail-49.gmarkup b/glib/tests/markups/fail-49.gmarkup
new file mode 100644 (file)
index 0000000..5e1e3bb
--- /dev/null
@@ -0,0 +1 @@
+<foo></foo 
diff --git a/glib/tests/markups/valid-12.expected b/glib/tests/markups/valid-12.expected
new file mode 100644 (file)
index 0000000..49e2aeb
--- /dev/null
@@ -0,0 +1,5 @@
+ELEMENT 'abcäöü'
+  TEXT '
+abcäöü
+'
+END 'abcäöü'
diff --git a/glib/tests/markups/valid-12.gmarkup b/glib/tests/markups/valid-12.gmarkup
new file mode 100644 (file)
index 0000000..34a6dec
--- /dev/null
@@ -0,0 +1,3 @@
+<abcäöü>
+abcäöü
+</abcäöü>
diff --git a/glib/tests/markups/valid-13.expected b/glib/tests/markups/valid-13.expected
new file mode 100644 (file)
index 0000000..84f0e71
--- /dev/null
@@ -0,0 +1,4 @@
+ELEMENT 'foo'
+bar="a b c d e𝐀"
+  TEXT ''
+END 'foo'
diff --git a/glib/tests/markups/valid-13.gmarkup b/glib/tests/markups/valid-13.gmarkup
new file mode 100644 (file)
index 0000000..70afdb7
--- /dev/null
@@ -0,0 +1,3 @@
+<foo bar="a    b
+c\rd\r
+e𝐀"></foo>
diff --git a/glib/tests/markups/valid-14.expected b/glib/tests/markups/valid-14.expected
new file mode 100644 (file)
index 0000000..cea1fdd
--- /dev/null
@@ -0,0 +1,30 @@
+ELEMENT 'foo'
+  TEXT '
+'
+  ELEMENT 'bar'
+    TEXT '
+/* gmarkup.c - Simple XML-like parser
+ *
+ *  Copyright 2000, 2003 Red Hat, Inc.
+ *  Copyright 2007, 2008 Ryan Lortie <desrt@desrt.ca>
+ *
+ * GLib is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * GLib is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GLib; see the file COPYING.LIB.  If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ *   Boston, MA 02111-1307, USA.
+ */
+'
+  END 'bar'
+  TEXT '
+'
+END 'foo'
diff --git a/glib/tests/markups/valid-14.gmarkup b/glib/tests/markups/valid-14.gmarkup
new file mode 100644 (file)
index 0000000..f999a34
--- /dev/null
@@ -0,0 +1,24 @@
+<foo>
+<bar>
+/* gmarkup.c - Simple XML-like parser
+ *
+ *  Copyright 2000, 2003 Red Hat, Inc.
+ *  Copyright 2007, 2008 Ryan Lortie &lt;desrt@desrt.ca&gt;
+ *
+ * GLib is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * GLib is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GLib; see the file COPYING.LIB.  If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ *   Boston, MA 02111-1307, USA.
+ */
+</bar>
+</foo>