diff options
author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-06-19 15:26:13 +0000 |
---|---|---|
committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-06-19 15:26:13 +0000 |
commit | b30cbb0571acc552f53b3021ad9c63508a14330c (patch) | |
tree | 6a97640646a096e088f1f084651793dab745cd25 /test/test_writers/test_docutils_xml.py | |
parent | d90d048247c7f3012414659a52078b6c8a89765f (diff) | |
download | docutils-blais_interruptus@3512.tar.gz |
made xmlcharrefreplace the default output encoding error handler forblais_interruptus@3512
HTML and XML writer
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3512 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test/test_writers/test_docutils_xml.py')
-rwxr-xr-x | test/test_writers/test_docutils_xml.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_writers/test_docutils_xml.py b/test/test_writers/test_docutils_xml.py index 1b9790c6a..f5cf18b3f 100755 --- a/test/test_writers/test_docutils_xml.py +++ b/test/test_writers/test_docutils_xml.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # Author: Felix Wiemann # Contact: Felix_Wiemann@ososo.de @@ -19,17 +20,16 @@ import docutils.core class DocutilsXMLTestCase(DocutilsTestSupport.StandardTestCase): - input = 'Test\n====\n\nSubsection\n----------\n\nTest\n\n----------\n\nTest.' + input = 'Test\n====\n\nSubsection\n----------\n\nTest\n\n----------\n\nTest. äöü€' xmldecl = '<?xml version="1.0" encoding="iso-8859-1"?>\n' doctypedecl = '<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">\n' generatedby = '<!-- Generated by Docutils %s -->\n' % docutils.__version__ - bodynormal = '<document ids="test" names="test" source="<string>"><title>Test</title><subtitle ids="subsection" names="subsection">Subsection</subtitle><paragraph>Test</paragraph><transition/><paragraph>Test.</paragraph></document>' - bodynormal = '<document ids="test" names="test" source="<string>"><title>Test</title><subtitle ids="subsection" names="subsection">Subsection</subtitle><paragraph>Test</paragraph><transition/><paragraph>Test.</paragraph></document>' - bodynewlines = '<document ids="test" names="test" source="<string>">\n<title>\nTest\n</title>\n<subtitle ids="subsection" names="subsection">\nSubsection\n</subtitle>\n<paragraph>\nTest\n</paragraph>\n<transition/>\n<paragraph>\nTest.\n</paragraph>\n</document>\n' - bodyindents = '<document ids="test" names="test" source="<string>">\n <title>\n Test\n </title>\n <subtitle ids="subsection" names="subsection">\n Subsection\n </subtitle>\n <paragraph>\n Test\n </paragraph>\n <transition/>\n <paragraph>\n Test.\n </paragraph>\n</document>\n' + bodynormal = '<document ids="test" names="test" source="<string>"><title>Test</title><subtitle ids="subsection" names="subsection">Subsection</subtitle><paragraph>Test</paragraph><transition/><paragraph>Test. \xe4\xf6\xfc€</paragraph></document>' + bodynewlines = '<document ids="test" names="test" source="<string>">\n<title>\nTest\n</title>\n<subtitle ids="subsection" names="subsection">\nSubsection\n</subtitle>\n<paragraph>\nTest\n</paragraph>\n<transition/>\n<paragraph>\nTest. \xe4\xf6\xfc€\n</paragraph>\n</document>\n' + bodyindents = '<document ids="test" names="test" source="<string>">\n <title>\n Test\n </title>\n <subtitle ids="subsection" names="subsection">\n Subsection\n </subtitle>\n <paragraph>\n Test\n </paragraph>\n <transition/>\n <paragraph>\n Test. \xe4\xf6\xfc€\n </paragraph>\n</document>\n' def test_publish(self): - settings = {'output_encoding': 'iso-8859-1'} + settings = {'input_encoding': 'utf8', 'output_encoding': 'iso-8859-1'} for settings['newlines'] in 0, 1: for settings['indents'] in 0, 1: for settings['xml_declaration'] in 0, 1: |