0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-10-27 17:54:26 -04:00

Fix various bugs (#35684) (#35696)

Backport #35684 by wxiaoguang
This commit is contained in:
Giteabot
2025-10-19 02:26:03 +08:00
committed by GitHub
parent f71df88a6b
commit 4af1d58c86
15 changed files with 98 additions and 86 deletions

View File

@@ -176,4 +176,12 @@ func TestParseControlFile(t *testing.T) {
assert.Equal(t, []string{"a", "b"}, p.Metadata.Dependencies)
assert.Equal(t, full, p.Control)
})
t.Run("ValidVersions", func(t *testing.T) {
for _, version := range []string{"1.0", "0:1.2", "9:1.0", "10:1.0", "900:1a.2b-x-y_z~1+2"} {
p, err := ParseControlFile(buildContent("testpkg", version, "amd64"))
assert.NoError(t, err, "ParseControlFile with version %q", version)
assert.NotNil(t, p)
}
})
}