Add unittests for whitespace handling in text node

Also expand/fix the test for line endings
This commit is contained in:
Eduard Braun 2018-07-03 22:53:05 +02:00
parent 703122369e
commit 651694a6c0
5 changed files with 166 additions and 35 deletions

50
unittests/newlines.svg Normal file
View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
>
<!-- this file has pretty messed up formatting --> <rect width="100" height="100"/>
<rect width="100" height="100"/>
<rect width="100" height="100"/>
<rect width="100" height="100"/>
<rect width="100" height="100"/>
<rect width="100" height="100"/>
<!-- we have mixed newline
characters, carriage returns and both of them
as well as tabs and spaces
-->
<rect width="100" height="100"/><rect width="100" height="100"/> <rect width="100" height="100"/>
<rect width="100" height="100"/> <rect width="100" height="100"/> <rect width="100" height="100"/>
<rect width="100" height="100"/> <rect width="100" height="100"/>
</svg>
<!-- OMG, really? -->

After

Width:  |  Height:  |  Size: 889 B