|
|
|
@ -216,6 +216,9 @@ func TestIsSVGImageFile(t *testing.T) { |
|
|
|
|
assert.True(t, IsSVGImageFile([]byte(`<!-- Multiline |
|
|
|
|
Comment --> |
|
|
|
|
<svg></svg>`))) |
|
|
|
|
assert.True(t, IsSVGImageFile([]byte(`<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" |
|
|
|
|
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> |
|
|
|
|
<svg></svg>`))) |
|
|
|
|
assert.True(t, IsSVGImageFile([]byte(`<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
|
<!-- Comment --> |
|
|
|
|
<svg></svg>`))) |
|
|
|
@ -227,6 +230,11 @@ func TestIsSVGImageFile(t *testing.T) { |
|
|
|
|
<!-- Multline |
|
|
|
|
Comment --> |
|
|
|
|
<svg></svg>`))) |
|
|
|
|
assert.True(t, IsSVGImageFile([]byte(`<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
|
|
|
|
<!-- Multline |
|
|
|
|
Comment --> |
|
|
|
|
<svg></svg>`))) |
|
|
|
|
assert.False(t, IsSVGImageFile([]byte{})) |
|
|
|
|
assert.False(t, IsSVGImageFile([]byte("svg"))) |
|
|
|
|
assert.False(t, IsSVGImageFile([]byte("<svgfoo></svgfoo>"))) |
|
|
|
|