(t *testing.T)
| 2230 | } |
| 2231 | |
| 2232 | func TestParseMultiFloat64SliceFromEnv(t *testing.T) { |
| 2233 | t.Setenv("APP_INTERVALS", "0.1,-10.5") |
| 2234 | |
| 2235 | _ = (&Command{ |
| 2236 | Flags: []Flag{ |
| 2237 | &FloatSliceFlag{Name: "intervals", Aliases: []string{"i"}, Value: []float64{}, Sources: EnvVars("APP_INTERVALS")}, |
| 2238 | }, |
| 2239 | Action: func(_ context.Context, cmd *Command) error { |
| 2240 | require.Equalf(t, []float64{0.1, -10.5}, cmd.FloatSlice("intervals"), "main name not set from env") |
| 2241 | return nil |
| 2242 | }, |
| 2243 | }).Run(buildTestContext(t), []string{"run"}) |
| 2244 | } |
| 2245 | |
| 2246 | func TestParseMultiFloat64SliceFromEnvCascade(t *testing.T) { |
| 2247 | t.Setenv("APP_INTERVALS", "0.1234,-10.5") |
nothing calls this directly
no test coverage detected