Update TestCommandIgnoreFlagsIncludingFirstArgument to test for arguments

main
Jesse Szwedko 9 years ago
parent 6191d931b7
commit 8cd49b108c

@ -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"})
}

@ -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))
}
}

Loading…
Cancel
Save