diff --git a/command_test.go b/command_test.go index bf7cc99..1e9e7fa 100644 --- a/command_test.go +++ b/command_test.go @@ -64,6 +64,7 @@ func TestCommandIgnoreFlagsIncludingFirstArgument(t *testing.T) { SkipFlagParsing: true, } err := command.Run(c) - expect(t, err, nil) + + expect(t, []string(c.Args()), []string{"blah", "-break"}) } diff --git a/helpers_test.go b/helpers_test.go index 3ce8e93..b1b7339 100644 --- a/helpers_test.go +++ b/helpers_test.go @@ -7,13 +7,13 @@ import ( /* Test Helpers */ func expect(t *testing.T, a interface{}, b interface{}) { - if a != b { + if !reflect.DeepEqual(a, b) { t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) } } func refute(t *testing.T, a interface{}, b interface{}) { - if a == b { + if reflect.DeepEqual(a, b) { t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) } }