(t *testing.T)
| 69 | } |
| 70 | |
| 71 | func TestBoolFlagValueFromCommand(t *testing.T) { |
| 72 | tf := &BoolFlag{Name: "trueflag"} |
| 73 | ff := &BoolFlag{Name: "falseflag"} |
| 74 | |
| 75 | cmd := buildMinimalTestCommand() |
| 76 | cmd.Flags = []Flag{ |
| 77 | tf, |
| 78 | ff, |
| 79 | } |
| 80 | |
| 81 | r := require.New(t) |
| 82 | r.NoError(cmd.Set(tf.Name, "true")) |
| 83 | r.NoError(cmd.Set(ff.Name, "false")) |
| 84 | r.True(cmd.Bool(tf.Name)) |
| 85 | r.False(cmd.Bool(ff.Name)) |
| 86 | } |
| 87 | |
| 88 | func TestBoolFlagApply_SetsCount(t *testing.T) { |
| 89 | v := false |
nothing calls this directly
no test coverage detected