Skip to content

Commit

Permalink
set test args to be empty, not nil
Browse files Browse the repository at this point in the history
if nil, the args will grab from os.Args which isn't what we want here
  • Loading branch information
kbatten committed Sep 7, 2013
1 parent eac2c0a commit 4dcfb5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docopt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ func TestCountMultipleFlags(t *testing.T) {
if v, _, err := parse("usage: prog [-v]", []string{"-v"}, true, "", false); reflect.DeepEqual(v, map[string]interface{}{"-v": true}) != true {
t.Error(err)
}
if v, _, err := parse("usage: prog [-vv]", nil, true, "", false); reflect.DeepEqual(v, map[string]interface{}{"-v": 0}) != true {
if v, _, err := parse("usage: prog [-vv]", []string{}, true, "", false); reflect.DeepEqual(v, map[string]interface{}{"-v": 0}) != true {
t.Error(err)
}
if v, _, err := parse("usage: prog [-vv]", []string{"-v"}, true, "", false); reflect.DeepEqual(v, map[string]interface{}{"-v": 1}) != true {
Expand Down

0 comments on commit 4dcfb5a

Please sign in to comment.