8000 add test case for flag without name or aliases · urfave/cli@69df7bf · GitHub
[go: up one dir, main page]

Skip to content
/ cli Public

Commit 69df7bf

Browse files
committed
add test case for flag without name or aliases
1 parent a7e3459 commit 69df7bf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

context_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,13 @@ func TestCheckRequiredFlags(t *testing.T) {
610610
&StringFlag{Name: "collection", Required: true, Aliases: []string{"c"}},
611611
},
612612
},
613+
{
614+
testCase: "required_flag_without_name_or_aliases_doesnt_error",
615+
expectedAnError: false,
616+
flags: []Flag{
617+
&StringFlag{Required: true},
618+
},
619+
},
613620
}
614621

615622
for _, test := range tdata {

0 commit comments

Comments
 (0)
0