(t *testing.T)
| 1578 | } |
| 1579 | |
| 1580 | func TestFloat64SliceFlagApply_UsesEnvValues_noDefault(t *testing.T) { |
| 1581 | t.Setenv("MY_GOAT", "1.0 , 2.0") |
| 1582 | fl := FloatSliceFlag{Name: "goat", Sources: EnvVars("MY_GOAT")} |
| 1583 | cmd := &Command{ |
| 1584 | Flags: []Flag{ |
| 1585 | &fl, |
| 1586 | }, |
| 1587 | } |
| 1588 | |
| 1589 | assert.NoError(t, cmd.Run(buildTestContext(t), []string{""})) |
| 1590 | assert.Equal(t, []float64{1, 2}, cmd.Value("goat")) |
| 1591 | } |
| 1592 | |
| 1593 | func TestFloat64SliceFlagApply_UsesEnvValues_withDefault(t *testing.T) { |
| 1594 | t.Setenv("MY_GOAT", "1.0 , 2.0") |
nothing calls this directly
no test coverage detected
searching dependent graphs…