Skip to content

Commit

Permalink
Update command_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: lynn (they) <lynncyrin@gmail.com>
  • Loading branch information
thaJeztah and coilysiren committed May 14, 2020
1 parent 8486894 commit 298346c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions command_test.go
Expand Up @@ -140,6 +140,12 @@ func TestParseAndRunHyphenValues(t *testing.T) {
{[]string{"foo", "test", "--opt", "--opt-value", "arg1", "arg2"}, []string{"arg1", "arg2"}, "--opt-value"},
{[]string{"foo", "test", "arg1", "--opt", "--opt-value"}, []string{"arg1"}, "--opt-value"},
{[]string{"foo", "test", "arg1", "--opt", "--opt-value", "arg2"}, []string{"arg1", "arg2"}, "--opt-value"},

{[]string{"foo", "test", "--", "arg1", "--opt", "--opt-value", "arg2"}, []string{""}, ""},
{[]string{"foo", "test", "arg1", "--", "--opt", "--opt-value", "arg2"}, []string{"arg1"}, ""},
{[]string{"foo", "test", "arg1", "--opt", "--", "--opt-value", "arg2"}, []string{"arg1"}, ""},
{[]string{"foo", "test", "arg1", "--opt", "--opt-value", "--", "arg2"}, []string{"arg1"}, "--opt-value"},
{[]string{"foo", "test", "arg1", "--opt", "--opt-value", "arg2", "--"}, []string{"arg1", "arg2"}, "--opt-value"},
}

for _, tc := range cases {
Expand Down

0 comments on commit 298346c

Please sign in to comment.