test(dpkg,apk): exhaustive tests for dpkg extras, fix apk parseInfoNameVersion panic

- dpkg: add normalize_test.go with NormalizeName/ParseArch table tests
- dpkg: add capabilities, DryRunner, interface compliance, parse edge cases
- apk: fix parseInfoNameVersion panic on empty input
- apk: add empty/whitespace test cases for parseInfoNameVersion

807 tests passing, 0 failures.
This commit is contained in:
2026-03-06 00:01:43 +00:00
parent c34b7a467c
commit 60b68060e7
4 changed files with 233 additions and 6 deletions

View File

@@ -312,6 +312,18 @@ func TestParseInfoNameVersion(t *testing.T) {
wantN: "lib-ssl-dev",
wantV: "3.0.0-r0",
},
{
name: "empty",
input: "",
wantN: "",
wantV: "",
},
{
name: "whitespace_only",
input: " ",
wantN: "",
wantV: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {