1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00

add tests of cleanupListOfValues

This commit is contained in:
Kiyohiko Heima
2014-12-07 21:48:10 +09:00
parent 385d6534d2
commit 8222f41cd4
4 changed files with 34 additions and 1 deletions

View File

@ -102,7 +102,7 @@ exports.fn = function(item, params) {
units = '';
}
roundedListArr.push(num);
roundedListArr.push(num+units);
}
// if attribute value is "new"(only enable-background).

View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500.2132 500.213823642" enable-background="new 0 0 500.224551535 500.213262">
test
</svg>
@@@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500.213 500.214" enable-background="new 0 0 500.225 500.213">
test
</svg>

After

Width:  |  Height:  |  Size: 284 B

View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg">
<polygon stroke-dasharray="200.22222 200.22522" points="413.74712,290.95212 290.75632 , 343.89942 183.40744 ,263.8582523 199.05334, 130.871345 322.04442,77.92533 429.39122,157.96555 "/>
test
</svg>
@@@
<svg xmlns="http://www.w3.org/2000/svg">
<polygon stroke-dasharray="200.222 200.225" points="413.747 290.952 290.756 343.899 183.407 263.858 199.053 130.871 322.044 77.925 429.391 157.966"/>
test
</svg>

After

Width:  |  Height:  |  Size: 467 B

View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg">
<text x="23.2350 20.2268px 0.22356em 80.0005%" y="23.2350 20.2268px 0.22356em 80.0005%" dx="23.2350 20.2268px 0.22356em 80.0005%" dy="23.2350 20.2268px 0.22356em 80.0005%">
test
</text>
</svg>
@@@
<svg xmlns="http://www.w3.org/2000/svg">
<text x="23.235 20.227 .224em 80.001%" y="23.235 20.227 .224em 80.001%" dx="23.235 20.227 .224em 80.001%" dy="23.235 20.227 .224em 80.001%">
test
</text>
</svg>

After

Width:  |  Height:  |  Size: 474 B