mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user