Fix Bug 511186: Preserve comments surround <svg> root node
This commit is contained in:
parent
6147bb2085
commit
c835423e8f
3 changed files with 25 additions and 7 deletions
11
testscour.py
11
testscour.py
|
|
@ -987,7 +987,16 @@ class XmlEntities(unittest.TestCase):
|
|||
def runTest(self):
|
||||
self.assertEquals( scour.makeWellFormed('<>&"\''), '<>&"'',
|
||||
'Incorrectly translated XML entities')
|
||||
|
||||
|
||||
class DoNotStripCommentsOutsideOfRoot(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/comments.svg')
|
||||
self.assertEquals( doc.childNodes.length, 4,
|
||||
'Did not include all comment children outside of root')
|
||||
self.assertEquals( doc.childNodes[0].nodeType, 8, 'First node not a comment')
|
||||
self.assertEquals( doc.childNodes[1].nodeType, 8, 'Second node not a comment')
|
||||
self.assertEquals( doc.childNodes[3].nodeType, 8, 'Fourth node not a comment')
|
||||
|
||||
# TODO: write tests for --enable-viewboxing
|
||||
# TODO; write a test for embedding rasters
|
||||
# TODO: write a test for --disable-embed-rasters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue