Add test when flag is not set
This commit is contained in:
parent
7f37d1d13c
commit
d198aed170
@ -321,6 +321,15 @@ func TestFloat64ApplyInputSourceMethodSetNegativeValue(t *testing.T) {
|
||||
expect(t, -1.3, c.Float64("test"))
|
||||
}
|
||||
|
||||
func TestFloat64ApplyInputSourceMethodSetNegativeValueNotSet(t *testing.T) {
|
||||
c := runTest(t, testApplyInputSource{
|
||||
Flag: NewFloat64Flag(&cli.Float64Flag{Name: "test1"}),
|
||||
FlagName: "test1",
|
||||
// dont set map value
|
||||
})
|
||||
expect(t, 0.0, c.Float64("test1"))
|
||||
}
|
||||
|
||||
func TestFloat64ApplyInputSourceMethodContextSet(t *testing.T) {
|
||||
c := runTest(t, testApplyInputSource{
|
||||
Flag: NewFloat64Flag(&cli.Float64Flag{Name: "test"}),
|
||||
|
Loading…
Reference in New Issue
Block a user