[glib] Add some more GMarkup tests
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Add some more GMarkup tests
- Date: Sun, 9 Oct 2011 03:50:19 +0000 (UTC)
commit d5a1ca8fd751c6f0a28ad3990259976f23954a34
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 6 09:01:24 2011 -0400
Add some more GMarkup tests
glib/tests/markups/fail-41.expected | 1 +
glib/tests/markups/fail-41.gmarkup | 3 +++
glib/tests/markups/fail-42.expected | 1 +
glib/tests/markups/fail-42.gmarkup | 5 +++++
glib/tests/markups/fail-43.expected | 1 +
glib/tests/markups/fail-43.gmarkup | 1 +
glib/tests/markups/fail-44.expected | 3 +++
glib/tests/markups/fail-44.gmarkup | 1 +
glib/tests/markups/fail-45.expected | 3 +++
glib/tests/markups/fail-45.gmarkup | 1 +
glib/tests/markups/fail-46.expected | 2 ++
glib/tests/markups/fail-46.gmarkup | 2 ++
glib/tests/markups/fail-47.expected | 1 +
glib/tests/markups/fail-47.gmarkup | 1 +
glib/tests/markups/fail-48.expected | 1 +
glib/tests/markups/fail-48.gmarkup | 2 ++
glib/tests/markups/fail-49.expected | 3 +++
glib/tests/markups/fail-49.gmarkup | 1 +
glib/tests/markups/valid-12.expected | 5 +++++
glib/tests/markups/valid-12.gmarkup | 3 +++
glib/tests/markups/valid-13.expected | 4 ++++
glib/tests/markups/valid-13.gmarkup | 3 +++
glib/tests/markups/valid-14.expected | 30 ++++++++++++++++++++++++++++++
glib/tests/markups/valid-14.gmarkup | 24 ++++++++++++++++++++++++
24 files changed, 102 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/markups/fail-41.expected b/glib/tests/markups/fail-41.expected
new file mode 100644
index 0000000..ab476ef
--- /dev/null
+++ b/glib/tests/markups/fail-41.expected
@@ -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
index 0000000..04780b4
--- /dev/null
+++ b/glib/tests/markups/fail-41.gmarkup
@@ -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
index 0000000..4fbf685
--- /dev/null
+++ b/glib/tests/markups/fail-42.expected
@@ -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 &
diff --git a/glib/tests/markups/fail-42.gmarkup b/glib/tests/markups/fail-42.gmarkup
new file mode 100644
index 0000000..51e71b1
--- /dev/null
+++ b/glib/tests/markups/fail-42.gmarkup
@@ -0,0 +1,5 @@
+<foo bar="ab
+cd
+<
+de
+fg"></foo>
diff --git a/glib/tests/markups/fail-43.expected b/glib/tests/markups/fail-43.expected
new file mode 100644
index 0000000..57a7b02
--- /dev/null
+++ b/glib/tests/markups/fail-43.expected
@@ -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
index 0000000..c247c71
--- /dev/null
+++ b/glib/tests/markups/fail-43.gmarkup
@@ -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
index 0000000..2548050
--- /dev/null
+++ b/glib/tests/markups/fail-44.expected
@@ -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
index 0000000..f6217db
--- /dev/null
+++ b/glib/tests/markups/fail-44.gmarkup
@@ -0,0 +1 @@
+<foo/â
diff --git a/glib/tests/markups/fail-45.expected b/glib/tests/markups/fail-45.expected
new file mode 100644
index 0000000..866b751
--- /dev/null
+++ b/glib/tests/markups/fail-45.expected
@@ -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
index 0000000..4183291
--- /dev/null
+++ b/glib/tests/markups/fail-45.gmarkup
@@ -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
index 0000000..f3ab8ca
--- /dev/null
+++ b/glib/tests/markups/fail-46.expected
@@ -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
index 0000000..36daef4
--- /dev/null
+++ b/glib/tests/markups/fail-46.gmarkup
@@ -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
index 0000000..89dc4b4
--- /dev/null
+++ b/glib/tests/markups/fail-47.expected
@@ -0,0 +1 @@
+ERROR Error on line 1: Failed to parse '', which should have been a digit inside a character reference (ê 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
index 0000000..bbe8179
--- /dev/null
+++ b/glib/tests/markups/fail-47.gmarkup
@@ -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
index 0000000..e5fa740
--- /dev/null
+++ b/glib/tests/markups/fail-48.expected
@@ -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
index 0000000..fcbeab6
--- /dev/null
+++ b/glib/tests/markups/fail-48.gmarkup
@@ -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
index 0000000..fc3bacb
--- /dev/null
+++ b/glib/tests/markups/fail-49.expected
@@ -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
index 0000000..5e1e3bb
--- /dev/null
+++ b/glib/tests/markups/fail-49.gmarkup
@@ -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
index 0000000..49e2aeb
--- /dev/null
+++ b/glib/tests/markups/valid-12.expected
@@ -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
index 0000000..34a6dec
--- /dev/null
+++ b/glib/tests/markups/valid-12.gmarkup
@@ -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
index 0000000..84f0e71
--- /dev/null
+++ b/glib/tests/markups/valid-13.expected
@@ -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
index 0000000..70afdb7
--- /dev/null
+++ b/glib/tests/markups/valid-13.gmarkup
@@ -0,0 +1,3 @@
+<foo bar="a b
+cd
+eð"></foo>
diff --git a/glib/tests/markups/valid-14.expected b/glib/tests/markups/valid-14.expected
new file mode 100644
index 0000000..cea1fdd
--- /dev/null
+++ b/glib/tests/markups/valid-14.expected
@@ -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
index 0000000..f999a34
--- /dev/null
+++ b/glib/tests/markups/valid-14.gmarkup
@@ -0,0 +1,24 @@
+<foo>
+<bar>
+/* 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.
+ */
+</bar>
+</foo>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]