In this tests the error message should be more descriptive:
summary: "Globbing must also have a single target",
pkgdata: testutil.PackageData["test-package"],
options: deb.ExtractOptions{
Extract: map[string][]deb.ExtractInfo{
"/etc/d**": []deb.ExtractInfo{{
Path: "/etc/d**",
}, {
Path: "/etc/d**",
}},
},
},
error: `cannot extract .*: when using wildcards source and target paths must match: /etc/d\*\*`,
}, {
summary: "Globbing cannot change modes",
pkgdata: testutil.PackageData["test-package"],
options: deb.ExtractOptions{
Extract: map[string][]deb.ExtractInfo{
"/d1/d**": []deb.ExtractInfo{{
Path: "/d1/d**",
Mode: 0777,
}},
},
},
error: `cannot extract .*: when using wildcards source and target paths must match: /d1/d\*\*`,
In this tests the error message should be more descriptive: