Skip to content

Commit 29729a7

Browse files
leaanthonyCopilot
andauthored
Update v3/test/5161/darwin_min_version_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5fcb5ca commit 29729a7

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

v3/test/5161/darwin_min_version_test.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ func TestDarwinInfoPlistMinVersion(t *testing.T) {
3636

3737
var plistDict map[string]any
3838
_, err = plist.Unmarshal(data, &plistDict)
39-
if err == nil {
40-
minVer, ok := plistDict["LSMinimumSystemVersion"]
41-
if ok && minVer != expectedVersion {
42-
t.Errorf("LSMinimumSystemVersion = %v, want %s", minVer, expectedVersion)
43-
}
39+
if err != nil {
40+
t.Fatalf("Failed to unmarshal plist template %s: %v", tmpl, err)
41+
}
42+
43+
minVer, ok := plistDict["LSMinimumSystemVersion"]
44+
if !ok {
45+
t.Fatalf("Template %s is missing LSMinimumSystemVersion", tmpl)
46+
}
47+
if minVer != expectedVersion {
48+
t.Errorf("LSMinimumSystemVersion = %v, want %s", minVer, expectedVersion)
4449
}
4550
})
4651
}

0 commit comments

Comments
 (0)