Fix tests per latest main

This commit is contained in:
Naveen Gogineni 2022-08-15 11:41:28 -04:00
parent f11dfa6b8b
commit ec257a8705

View File

@ -1215,10 +1215,10 @@ var uintSliceFlagTests = []struct {
value *UintSlice value *UintSlice
expected string expected string
}{ }{
{"heads", nil, NewUintSlice(), "--heads value\t(accepts multiple inputs)"}, {"heads", nil, NewUintSlice(), "--heads value [ --heads value ]\t"},
{"H", nil, NewUintSlice(), "-H value\t(accepts multiple inputs)"}, {"H", nil, NewUintSlice(), "-H value [ -H value ]\t"},
{"heads", []string{"H"}, NewUintSlice(uint(2), uint(17179869184)), {"heads", []string{"H"}, NewUintSlice(uint(2), uint(17179869184)),
"--heads value, -H value\t(default: 2, 17179869184)\t(accepts multiple inputs)"}, "--heads value, -H value [ --heads value, -H value ]\t(default: 2, 17179869184)"},
} }
func TestUintSliceFlagHelpOutput(t *testing.T) { func TestUintSliceFlagHelpOutput(t *testing.T) {
@ -1311,10 +1311,10 @@ var uint64SliceFlagTests = []struct {
value *Uint64Slice value *Uint64Slice
expected string expected string
}{ }{
{"heads", nil, NewUint64Slice(), "--heads value\t(accepts multiple inputs)"}, {"heads", nil, NewUint64Slice(), "--heads value [ --heads value ]\t"},
{"H", nil, NewUint64Slice(), "-H value\t(accepts multiple inputs)"}, {"H", nil, NewUint64Slice(), "-H value [ -H value ]\t"},
{"heads", []string{"H"}, NewUint64Slice(uint64(2), uint64(17179869184)), {"heads", []string{"H"}, NewUint64Slice(uint64(2), uint64(17179869184)),
"--heads value, -H value\t(default: 2, 17179869184)\t(accepts multiple inputs)"}, "--heads value, -H value [ --heads value, -H value ]\t(default: 2, 17179869184)"},
} }
func TestUint64SliceFlagHelpOutput(t *testing.T) { func TestUint64SliceFlagHelpOutput(t *testing.T) {
@ -2717,13 +2717,13 @@ func TestFlagDefaultValue(t *testing.T) {
name: "uint64Slice", name: "uint64Slice",
flag: &Uint64SliceFlag{Name: "flag", Value: NewUint64Slice(1, 2)}, flag: &Uint64SliceFlag{Name: "flag", Value: NewUint64Slice(1, 2)},
toParse: []string{"--flag", "13"}, toParse: []string{"--flag", "13"},
expect: `--flag value (default: 1, 2) (accepts multiple inputs)`, expect: `--flag value [ --flag value ] (default: 1, 2)`,
}, },
{ {
name: "uintSlice", name: "uintSlice",
flag: &UintSliceFlag{Name: "flag", Value: NewUintSlice(1, 2)}, flag: &UintSliceFlag{Name: "flag", Value: NewUintSlice(1, 2)},
toParse: []string{"--flag", "13"}, toParse: []string{"--flag", "13"},
expect: `--flag value (default: 1, 2) (accepts multiple inputs)`, expect: `--flag value [ --flag value ] (default: 1, 2)`,
}, },
{ {
name: "string", name: "string",