Fix:(issue_1272) Generic flag not set from env

This commit is contained in:
Naveen Gogineni
2022-08-18 21:20:48 -04:00
committed by Dan Buch
parent 4bce542ed7
commit 68cd3e8148
3 changed files with 11 additions and 2 deletions

View File

@@ -166,6 +166,10 @@ func TestFlagsFromEnv(t *testing.T) {
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]))
}
if !f.IsSet() {
t.Errorf("Flag %s not set", f.Names()[0])
}
return nil
},
}