summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_xmllib.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/Lib/test/test_xmllib.py b/Lib/test/test_xmllib.py
new file mode 100644
index 0000000..eb868a3
--- /dev/null
+++ b/Lib/test/test_xmllib.py
@@ -0,0 +1,25 @@
+'''Test module to thest the xmllib module.
+ Sjoerd Mullender
+'''
+
+from test_support import verbose
+
+testdoc = """\
+<?xml version="1.0" encoding="UTF-8" standalone='yes' ?>
+<!-- comments aren't allowed before the <?xml?> tag,
+ but they are allowed before the <!DOCTYPE> tag -->
+<!DOCTYPE greeting [
+ <!ELEMENT greeting (#PCDATA)>
+]>
+<greeting>Hello, world!</greeting>
+"""
+
+import xmllib
+if verbose:
+ parser = xmllib.TestXMLParser()
+else:
+ parser = xmllib.XMLParser()
+
+for c in testdoc:
+ parser.feed(c)
+parser.close()