(t *testing.T)
| 347 | } |
| 348 | |
| 349 | func TestHasSVGRootElement(t *testing.T) { |
| 350 | t.Parallel() |
| 351 | |
| 352 | require.True(t, chatfiles.HasSVGRootElement([]byte(`<?xml version="1.0"?><svg xmlns="http://www.w3.org/2000/svg"></svg>`))) |
| 353 | require.True(t, chatfiles.HasSVGRootElement([]byte("\xef\xbb\xbf<svg></svg>"))) |
| 354 | require.False(t, chatfiles.HasSVGRootElement([]byte("<html><body>not svg</body></html>"))) |
| 355 | require.False(t, chatfiles.HasSVGRootElement([]byte("# SVG Example\n<svg width=\"100\">...</svg>"))) |
| 356 | require.False(t, chatfiles.HasSVGRootElement([]byte("name,icon\nlogo,<svg><rect/></svg>\n"))) |
| 357 | } |
nothing calls this directly
no test coverage detected