diff --git a/testscour.py b/testscour.py
index bb59323..0347ab1 100755
--- a/testscour.py
+++ b/testscour.py
@@ -828,15 +828,11 @@ class RemoveDefaultGradFYValue(unittest.TestCase):
class CDATAInXml(unittest.TestCase):
def runTest(self):
- self.assertEquals( scour.scourString(open('unittests/cdata.svg').read()),
- '''
-
-''',
- 'Improperly serialized the cdata unit tests')
+ lines = scour.scourString(open('unittests/cdata.svg').read()).splitlines()
+ print lines[4]
+ self.assertEquals( lines[3],
+ " alert('pb&j');",
+ 'CDATA did not come out correctly')
class WellFormedXMLLesserThanInAttrValue(unittest.TestCase):
def runTest(self):
@@ -930,23 +926,27 @@ class DoNotRemoveGradientsWhenReferencedInStyleCss(unittest.TestCase):
class DoNotPrettyPrintWhenWhitespacePreserved(unittest.TestCase):
def runTest(self):
- self.assertEquals( scour.scourString(open('unittests/whitespace-important.svg').read()),
- '''
+ s = scour.scourString(open('unittests/whitespace-important.svg').read()).splitlines()
+ c = '''
-''',
- 'Whitespace not preserved')
+'''.splitlines()
+ for i in range(4):
+ self.assertEquals( s[i], c[i],
+ 'Whitespace not preserved for line ' + str(i))
class DoNotPrettyPrintWhenNestedWhitespacePreserved(unittest.TestCase):
def runTest(self):
- self.assertEquals( scour.scourString(open('unittests/whitespace-nested.svg').read()),
- '''
+ s = scour.scourString(open('unittests/whitespace-nested.svg').read()).splitlines()
+ c = '''
-''',
- 'Whitespace not preserved when nested')
+'''.splitlines()
+ for i in range(4):
+ self.assertEquals( s[i], c[i],
+ 'Whitespace not preserved when nested for line ' + str(i))
class GetAttrPrefixRight(unittest.TestCase):
def runTest(self):