Some transform test files in need of corresponding test code.

This commit is contained in:
Johan Sundström 2011-02-21 01:50:33 -08:00
parent 66ef44691b
commit f45173f4ee
14 changed files with 62 additions and 0 deletions

View file

@ -1222,6 +1222,7 @@ class RemoveDefsWithWhitespace(unittest.TestCase):
# TODO: write a test for --disable-embed-rasters
# TODO: write tests for --keep-editor-data
# TODO: write tests for scouring transformations
# progress: the unittests/transform-* files list expected before/after behaviour
if __name__ == '__main__':
testcss = __import__('testcss')

View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(1 0 0 1 0 0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9"/>
</svg>

After

Width:  |  Height:  |  Size: 212 B

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(-0.70710678118654746 0.70710678118654757 -0.70710678118654757 -0.70710678118654746 0 0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="rotate(135)"/>
</svg>

After

Width:  |  Height:  |  Size: 367 B

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(0.70710678118654757 0.70710678118654746 -0.70710678118654746 0.70710678118654757 0 0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="rotate(45)"/>
</svg>

After

Width:  |  Height:  |  Size: 364 B

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(0 1 -1 0 0 0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="rotate(90)"/>
</svg>

After

Width:  |  Height:  |  Size: 292 B

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(-0.70710678118654746 -0.70710678118654757 0.70710678118654757 -0.70710678118654746 0 0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="rotate(-135)"/>
</svg>

After

Width:  |  Height:  |  Size: 368 B

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(0.70710678118654757 -0.70710678118654746 0.70710678118654746 0.70710678118654757 0 0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="rotate(-45)"/>
</svg>

After

Width:  |  Height:  |  Size: 365 B

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(0 -1 1 0 0 0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="rotate(-90)"/>
</svg>

After

Width:  |  Height:  |  Size: 293 B

View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 27">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(2 0 0 3 0 0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="scale(2 3)"/>
</svg>

After

Width:  |  Height:  |  Size: 237 B

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 -9 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(-1 0 0 -1 0 0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="scale(-1)"/>
</svg>

After

Width:  |  Height:  |  Size: 293 B

View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="2 3 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(1 0 0 1 2 3)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="translate(2 3)"/>
</svg>

After

Width:  |  Height:  |  Size: 239 B

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="rotate(90 0 0.0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9" transform="rotate(90)"/>
<!-- optional zero trailing args to transform type rotate get removed -->
</svg>

After

Width:  |  Height:  |  Size: 364 B

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 9 9">
<line transform="rotate(-300) rotate(-60)" stroke="red" y1="9" x1="9"/>
</svg>

After

Width:  |  Height:  |  Size: 153 B

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="translate(0, 20) translate(10) translate(-10 -20.0)"/>
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9"/>
</svg>

After

Width:  |  Height:  |  Size: 300 B