chore: 初始化仓库,导入项目基线代码
Academy v0.8.3 完整代码基线:Go 后端(internal/cmd/cli/mcp-server/docreader)、 Vue 前端(frontend)、数据库迁移(migrations)、部署编排(docker/helm/deploy)与文档。 今日开发的培训推送管理改动随后单独提交。
This commit is contained in:
commit
7ec21f35b0
5767 files changed
+1436788
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestLooksLikeSVG(t *testing.T) {
|
||||
for _, in := range []string{
|
||||
`<svg xmlns="http://www.w3.org/2000/svg"></svg>`,
|
||||
" \n<svg/>",
|
||||
"\ufeff<?xml version=\"1.0\"?>\n<!-- brand mark --><svg >x</svg>",
|
||||
"<?xml version=\"1.0\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"x.dtd\"><svg>y</svg>",
|
||||
"<SVG></SVG>",
|
||||
} {
|
||||
assert.True(t, looksLikeSVG([]byte(in)), "want SVG: %q", in)
|
||||
}
|
||||
for _, in := range []string{
|
||||
"", " ", "<svg", "<svgx>", "not markup at all",
|
||||
"<html><svg></svg></html>", "<?xml version=\"1.0\"?>", "<!-- unterminated",
|
||||
"root:x:0:0::/root:/bin/sh",
|
||||
} {
|
||||
assert.False(t, looksLikeSVG([]byte(in)), "want not SVG: %q", in)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user