mirror of
https://github.com/spf13/cobra.git
synced 2024-12-19 18:15:20 -07:00
update test
This commit is contained in:
parent
49443501ed
commit
23cadf7ab4
@ -118,11 +118,6 @@ func TestValidateFlagGroups(t *testing.T) {
|
||||
flagGroupsExclusive: []string{"a d", "a b", "a c"},
|
||||
args: []string{"--a=foo", "--b=foo", "--c=foo"},
|
||||
expectErr: `if any flags in the group [a b] are set none of the others can be; [a b] were all set`,
|
||||
}, {
|
||||
desc: "Validation of if present then others required groups occurs on groups in sorted order",
|
||||
flagGroupsIfPresentThenRequired: []string{"a d", "a b", "a c"},
|
||||
args: []string{"--a=foo"},
|
||||
expectErr: `if the first flag in the group [a b] is set, all other flags must be set; the following flags are not set: [b]`,
|
||||
}, {
|
||||
desc: "Persistent flags utilize required and exclusive groups and can fail required groups",
|
||||
flagGroupsRequired: []string{"a e", "e f"},
|
||||
|
Loading…
Reference in New Issue
Block a user