aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/tdewolff/minify/svg/pathdata_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/tdewolff/minify/svg/pathdata_test.go')
-rw-r--r--vendor/github.com/tdewolff/minify/svg/pathdata_test.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/vendor/github.com/tdewolff/minify/svg/pathdata_test.go b/vendor/github.com/tdewolff/minify/svg/pathdata_test.go
index a975aa0..8d4f4a5 100644
--- a/vendor/github.com/tdewolff/minify/svg/pathdata_test.go
+++ b/vendor/github.com/tdewolff/minify/svg/pathdata_test.go
@@ -28,8 +28,9 @@ func TestPathData(t *testing.T) {
{"M.0.1", "M0 .1"},
{"M200.0.1", "M2e2.1"},
- {"M0 0a3.28 3.28.0.0.0 3.279 3.28", "M0 0a3.28 3.28.0 0 0 3.279 3.28"}, // #114
- {"A1.1.0.0.0.0.2.3", "A1.1.0.0 0 0 .2."}, // bad input (sweep and large-arc are not booleans) gives bad output
+ {"M0 0a3.28 3.28.0.0.0 3.279 3.28", "M0 0a3.28 3.28.0.0.0 3.279 3.28"}, // #114
+ {"A1.1.0.0.0.0.2.3", "A1.1.0.0.0.0.2.3"}, // bad input (sweep and large-arc are not booleans) gives bad output
+ {"A.0.0.4.0.0.0.3", "A0 0 .4.0.0.0.3"}, // bad input, keep dot for booleans
// fuzz
{"", ""},
@@ -37,7 +38,11 @@ func TestPathData(t *testing.T) {
{".8.00c0", ""},
{".1.04h0e6.0e6.0e0.0", "h0 0 0 0"},
{"M.1.0.0.2Z", "M.1.0.0.2z"},
- {"A.0.0.0.0.3.2e3.7.0.0.0.0.0.1.3.0.0.0.0.2.3.2.0.0.0.0.20.2e-10.0.0.0.0.0.0.0.0", "A0 0 0 0 .3 2e2.7.0.0.0 0 0 .1.3 30 0 0 0 .2.3.2 3 20 0 0 .2 2e-1100 11 0 0 0 "}, // bad input (sweep and large-arc are not booleans) gives bad output
+ {"A.0.0.0.0.3.2e3.7.0.0.0.0.0.1.3.0.0.0.0.2.3.2.0.0.0.0.20.2e-10.0.0.0.0.0.0.0.0", "A0 0 0 0 .3 2e2.7.0.0.0.0.0.1.3.0.0.0.0.2.3.2.0.0.0.0.2 2e-11.0.0.0.0.0.0.0.0"}, // bad input (sweep and large-arc are not booleans) gives bad output
+ {
+ "A.0.0.4.0.0.0.3.0.0.0.0.0.4.2.0.0.0.0.2.0.4.0.0.0.4.2.8.2.0.0.0.2.9.28.0.0.0.0.0.2.3.0.0.0.0.0.0.2.3.2.09e-03.0.0.0.0.8.0.0.0.0.0.0.0",
+ "A0 0 .4.0.0.0.3.0.0.0.0.0.4.2.0.0.0.0.2.0.4.0.0.0.4.2.8.2.0.0.0.2.9.28.0.0.0.0.0.2.3.0.0.0.0.0.0.2.3.2 9e-5.0.0.0.0.8.0.0.0.0.0.0.0",
+ },
}
p := NewPathData(&Minifier{Decimals: -1})