mirror of
https://github.com/spf13/cobra
synced 2024-11-16 10:47:09 +00:00
args_test: add TestArgs_Nil
This commit is contained in:
parent
64d7401852
commit
a9dbe74c87
1 changed files with 7 additions and 0 deletions
|
@ -71,6 +71,13 @@ func TestArgs_No(t *testing.T) {
|
||||||
"Valid | Valid": {"unknown", NoArgs, true, []string{"one"}},
|
"Valid | Valid": {"unknown", NoArgs, true, []string{"one"}},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
func TestArgs_Nil(t *testing.T) {
|
||||||
|
testArgs(t, map[string]argsTestcase{
|
||||||
|
" | Arb": {"", nil, false, []string{"a", "b"}},
|
||||||
|
"Valid | Valid": {"", nil, true, []string{"one", "two"}},
|
||||||
|
"Valid | Invalid": {"invalid", nil, true, []string{"a"}},
|
||||||
|
})
|
||||||
|
}
|
||||||
func TestArgs_Arbitrary(t *testing.T) {
|
func TestArgs_Arbitrary(t *testing.T) {
|
||||||
testArgs(t, map[string]argsTestcase{
|
testArgs(t, map[string]argsTestcase{
|
||||||
" | Arb": {"", ArbitraryArgs, false, []string{"a", "b"}},
|
" | Arb": {"", ArbitraryArgs, false, []string{"a", "b"}},
|
||||||
|
|
Loading…
Reference in a new issue