Merge pull request #1129 from oleorhagen/reqflagr

Reqflagr
This commit is contained in:
lynn (they) 2020-05-04 14:36:22 -07:00 committed by GitHub
commit fdf2d38b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -534,6 +534,14 @@ func TestCheckRequiredFlags(t *testing.T) {
},
parseInput: []string{"-n", "asd", "-n", "qwe"},
},
{
testCase: "required_flag_with_short_alias_not_printed_on_error",
expectedAnError: true,
expectedErrorContents: []string{"Required flag \"names\" not set"},
flags: []Flag{
&StringSliceFlag{Name: "names, n", Required: true},
},
},
}
for _, test := range tdata {