Final scour 0.18: more fixes to XML serialization (wellformedness), some unit tests, update to package script to use zip file and to package the inkscape extension
This commit is contained in:
parent
5f5c8a431d
commit
eb2a7a05ac
6 changed files with 60 additions and 7 deletions
24
testscour.py
24
testscour.py
|
|
@ -833,6 +833,30 @@ class CDATAInXml(unittest.TestCase):
|
|||
</svg>''',
|
||||
'Improperly serialized the cdata unit tests')
|
||||
|
||||
class WellFormedXMLLesserThanInAttrValue(unittest.TestCase):
|
||||
def runTest(self):
|
||||
wellformed = scour.scourString(open('unittests/xml-well-formed.svg').read())
|
||||
self.assert_( wellformed.find('unicode="<"') != -1,
|
||||
"Improperly serialized < in attribute value")
|
||||
|
||||
class WellFormedXMLAmpersandInAttrValue(unittest.TestCase):
|
||||
def runTest(self):
|
||||
wellformed = scour.scourString(open('unittests/xml-well-formed.svg').read())
|
||||
self.assert_( wellformed.find('unicode="&"') != -1,
|
||||
'Improperly serialized & in attribute value' )
|
||||
|
||||
class WellFormedXMLLesserThanInTextContent(unittest.TestCase):
|
||||
def runTest(self):
|
||||
wellformed = scour.scourString(open('unittests/xml-well-formed.svg').read())
|
||||
self.assert_( wellformed.find('<title>2 < 5</title>') != -1,
|
||||
'Improperly serialized < in text content')
|
||||
|
||||
class WellFormedXMLAmpersandInTextContent(unittest.TestCase):
|
||||
def runTest(self):
|
||||
wellformed = scour.scourString(open('unittests/xml-well-formed.svg').read())
|
||||
self.assert_( wellformed.find('<desc>Peanut Butter & Jelly</desc>') != -1,
|
||||
'Improperly serialized & in text content')
|
||||
|
||||
# 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