Add hand-rolled XML serialization function to improve XML output. Added --indent option to choose indentation mechanism (space, tab, none)
This commit is contained in:
parent
04487ed1ec
commit
bac229dd14
3 changed files with 102 additions and 8 deletions
11
testscour.py
11
testscour.py
|
|
@ -820,6 +820,17 @@ class RemoveDefaultGradFYValue(unittest.TestCase):
|
|||
self.assertEquals( g.getAttribute('fy'), '',
|
||||
'fy matching cy not removed')
|
||||
|
||||
class CDATAInXml(unittest.TestCase):
|
||||
def runTest(self):
|
||||
self.assertEquals( scour.scourString(open('unittests/cdata.svg').read()),
|
||||
'''<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
alert('pb&j');
|
||||
]]></script>
|
||||
</svg>''',
|
||||
'Improperly serialized the cdata unit tests')
|
||||
|
||||
# TODO; write a test for embedding rasters
|
||||
# TODO: write a test for --disable-embed-rasters
|
||||
# TODO: write tests for --keep-editor-data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue