aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-09-11 23:42:01 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-09-11 23:42:01 +0000
commit3b7840cd6c714dbe444726625c27f03c4770b4be (patch)
tree549ac4c42e492cd36889013b8409a95e095fb7ab /test
parent5f1e1f8a87db7b672012cc2ce16ea58d78d75fe9 (diff)
downloadandroid_external_libxml2-3b7840cd6c714dbe444726625c27f03c4770b4be.tar.gz
android_external_libxml2-3b7840cd6c714dbe444726625c27f03c4770b4be.tar.bz2
android_external_libxml2-3b7840cd6c714dbe444726625c27f03c4770b4be.zip
adding namespace checkings while making sure they still parse as
* parser.c parserInternals.c tree.c include/libxml/parser.h include/libxml/xmlerror.h: adding namespace checkings while making sure they still parse as wellformed documents. Add an nsWellFormed status report to the context, and provide new appropriate error codes. * Makefile.am result/namespaces/* test/namespaces/*: add specific regression testing for the new namespace support * test/att5 result/noent/att5 result/att5 result/att5.sax: add more coverage for the attribute parsing and normalization code. Daniel
Diffstat (limited to 'test')
-rw-r--r--test/att573
-rw-r--r--test/namespaces/err_0.xml1
-rw-r--r--test/namespaces/err_1.xml1
-rw-r--r--test/namespaces/err_2.xml1
-rw-r--r--test/namespaces/err_3.xml1
-rw-r--r--test/namespaces/err_4.xml1
-rw-r--r--test/namespaces/err_5.xml1
-rw-r--r--test/namespaces/err_6.xml1
-rw-r--r--test/namespaces/err_7.xml1
-rw-r--r--test/namespaces/err_8.xml1
-rw-r--r--test/namespaces/err_9.xml2
11 files changed, 84 insertions, 0 deletions
diff --git a/test/att5 b/test/att5
new file mode 100644
index 00000000..2c051059
--- /dev/null
+++ b/test/att5
@@ -0,0 +1,73 @@
+<!DOCTYPE doc [<!ATTLIST normId attr NMTOKENS #IMPLIED>]>
+<doc>
+ <!-- no normalization -->
+ <norm attr=' '/>
+ <norm attr='
+ foo bar '/>
+ <norm attr='
+
+foobar'/>
+ <norm attr=' foo bar
+'/>
+ <norm attr='foobar
+
+'/>
+ <norm attr=' &amp; '/>
+ <norm attr='
+ foo&amp;bar '/>
+ <norm attr='
+
+foobar&amp;'/>
+ <norm attr='&amp;foo bar
+'/>
+ <norm attr='foobar
+
+&amp;'/>
+ <norm attr=' &lt; '/>
+ <norm attr='
+ foo&lt;bar '/>
+ <norm attr='
+
+foobar&lt;'/>
+ <norm attr='&lt;foo bar
+'/>
+ <norm attr='foobar
+
+&lt;'/>
+ <norm attr=' &#x20;&#13;&#xa;&#9; '/>
+ <!-- normalization -->
+ <normId attr=' '/>
+ <normId attr='
+ foo bar '/>
+ <normId attr='
+
+foobar'/>
+ <normId attr=' foo bar
+'/>
+ <normId attr='foobar
+
+'/>
+ <normId attr=' &amp; '/>
+ <normId attr='
+ foo&amp;bar '/>
+ <normId attr='
+
+foobar&amp;'/>
+ <normId attr='&amp;foo bar
+'/>
+ <normId attr='foobar
+
+&amp;'/>
+ <normId attr=' &lt; '/>
+ <normId attr='
+ foo&lt;bar '/>
+ <normId attr='
+
+foobar&lt;'/>
+ <normId attr='&lt;foo bar
+'/>
+ <normId attr='foobar
+
+&lt;'/>
+ <normId attr=' &#13;&#xa;&#9; '/> <!-- PBM serializing back -->
+</doc>
diff --git a/test/namespaces/err_0.xml b/test/namespaces/err_0.xml
new file mode 100644
index 00000000..50bdd321
--- /dev/null
+++ b/test/namespaces/err_0.xml
@@ -0,0 +1 @@
+<foo xmlnsbar="1"/>
diff --git a/test/namespaces/err_1.xml b/test/namespaces/err_1.xml
new file mode 100644
index 00000000..eb6f43b7
--- /dev/null
+++ b/test/namespaces/err_1.xml
@@ -0,0 +1 @@
+<foo xmlns:="http://example.com/"/>
diff --git a/test/namespaces/err_2.xml b/test/namespaces/err_2.xml
new file mode 100644
index 00000000..9fd51b3d
--- /dev/null
+++ b/test/namespaces/err_2.xml
@@ -0,0 +1 @@
+<:/>
diff --git a/test/namespaces/err_3.xml b/test/namespaces/err_3.xml
new file mode 100644
index 00000000..3d4d4391
--- /dev/null
+++ b/test/namespaces/err_3.xml
@@ -0,0 +1 @@
+<:foo/>
diff --git a/test/namespaces/err_4.xml b/test/namespaces/err_4.xml
new file mode 100644
index 00000000..9dc294e6
--- /dev/null
+++ b/test/namespaces/err_4.xml
@@ -0,0 +1 @@
+<f: xmlns:f="http://example.com/foo"/>
diff --git a/test/namespaces/err_5.xml b/test/namespaces/err_5.xml
new file mode 100644
index 00000000..5943c117
--- /dev/null
+++ b/test/namespaces/err_5.xml
@@ -0,0 +1 @@
+<f:a: xmlns:f="http://example.com/foo"/>
diff --git a/test/namespaces/err_6.xml b/test/namespaces/err_6.xml
new file mode 100644
index 00000000..e3eb3b2b
--- /dev/null
+++ b/test/namespaces/err_6.xml
@@ -0,0 +1 @@
+<f:a:b xmlns:f="http://example.com/foo"/>
diff --git a/test/namespaces/err_7.xml b/test/namespaces/err_7.xml
new file mode 100644
index 00000000..5bbe2356
--- /dev/null
+++ b/test/namespaces/err_7.xml
@@ -0,0 +1 @@
+<f:foo/>
diff --git a/test/namespaces/err_8.xml b/test/namespaces/err_8.xml
new file mode 100644
index 00000000..8321da2f
--- /dev/null
+++ b/test/namespaces/err_8.xml
@@ -0,0 +1 @@
+<tst xmlns:xml="http://example.com/"/>
diff --git a/test/namespaces/err_9.xml b/test/namespaces/err_9.xml
new file mode 100644
index 00000000..4478c602
--- /dev/null
+++ b/test/namespaces/err_9.xml
@@ -0,0 +1,2 @@
+<tst xmlns:a="http://example.com/" xmlns:b="http://example.com/"
+ a:err="1" b:err="2"/>