Add unit tests for new options

This commit is contained in:
Eitot 2016-08-29 11:24:29 +02:00
parent 5f2dd101df
commit aa1842fa45
4 changed files with 81 additions and 3 deletions

View file

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg">
<title>This is a title element with only text node children</title>
<desc>This is a desc element with only text node children</desc>
<metadata>This is a metadata element with only text node children</metadata>
</svg>

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 319 B

Before After
Before After

View file

@ -1,3 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<title></title>
<desc></desc>
<metadata></metadata>
</svg>

Before

Width:  |  Height:  |  Size: 72 B

After

Width:  |  Height:  |  Size: 106 B

Before After
Before After

View file

@ -1,4 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg">
<title xmlns:mytitle="http://example.org/mytitle">
<mytitle:title>This is an example SVG file</mytitle:title>
<mytitle:desc>Unit test for Scour's --remove-titles option</mytitle:desc>
</title>
<desc xmlns:mydesc="http://example.org/mydesc">
<mydesc:title>This is an example SVG file</mydesc:title>
<mydesc:para>Unit test for Scour's
<mydesc:emph>--remove-descriptions</mydesc:emph> option</mydesc:para>
</desc>
<metadata>
<rdf:RDF
xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After