Skip to content

Commit

Permalink
add test case for flag without name or aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
nirhaas committed Mar 27, 2023
1 parent a7e3459 commit 69df7bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,13 @@ func TestCheckRequiredFlags(t *testing.T) {
&StringFlag{Name: "collection", Required: true, Aliases: []string{"c"}},
},
},
{
testCase: "required_flag_without_name_or_aliases_doesnt_error",
expectedAnError: false,
flags: []Flag{
&StringFlag{Required: true},
},
},
}

for _, test := range tdata {
Expand Down

0 comments on commit 69df7bf

Please sign in to comment.