diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index 15581ccfd2a..3154fbf3e62 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -413,12 +413,19 @@ def testAttributeRepr(): def testTextNodeRepr(): pass def testWriteXML(): - str = '\n' + str = '' dom = parseString(str) domstr = dom.toxml() dom.unlink() confirm(str == domstr) +def testAltNewline(): + str = '\n\n' + dom = parseString(str) + domstr = dom.toprettyxml(newl="\r\n") + dom.unlink() + confirm(domstr == str.replace("\n", "\r\n")) + def testProcessingInstruction(): dom = parseString('') pi = dom.documentElement.firstChild @@ -878,9 +885,9 @@ def testSAX2DOM(): def testEncodings(): doc = parseString('') - confirm(doc.toxml() == u'\n\u20ac' - and doc.toxml('utf-8') == '\n\xe2\x82\xac' - and doc.toxml('iso-8859-15') == '\n\xa4', + confirm(doc.toxml() == u'\u20ac' + and doc.toxml('utf-8') == '\xe2\x82\xac' + and doc.toxml('iso-8859-15') == '\xa4', "testEncodings - encoding EURO SIGN") doc.unlink()