fix flagTests loop

This commit is contained in:
Martin Lees 2019-12-12 17:40:18 +01:00
parent c62d7736ea
commit 76ebb62d02

View File

@ -121,8 +121,8 @@ func TestFlagsFromEnv(t *testing.T) {
a := App{ a := App{
Flags: []Flag{test.flag}, Flags: []Flag{test.flag},
Action: func(ctx *Context) error { Action: func(ctx *Context) error {
if !reflect.DeepEqual(ctx.value(test.flag.Names()[0]), test.output) { if !reflect.DeepEqual(ctx.Value(test.flag.Names()[0]), test.output) {
t.Errorf("ex:%01d expected %q to be parsed as %#v, instead was %#v", i, test.input, test.output, ctx.value(test.flag.Names()[0])) t.Errorf("ex:%01d expected %q to be parsed as %#v, instead was %#v", i, test.input, test.output, ctx.Value(test.flag.Names()[0]))
} }
return nil return nil
}, },