(t *testing.T)
| 2215 | } |
| 2216 | |
| 2217 | func TestParseMultiFloat64FromEnvCascade(t *testing.T) { |
| 2218 | t.Setenv("APP_TIMEOUT_SECONDS", "15.5") |
| 2219 | |
| 2220 | _ = (&Command{ |
| 2221 | Flags: []Flag{ |
| 2222 | &FloatFlag{Name: "timeout", Aliases: []string{"t"}, Sources: EnvVars("COMPAT_TIMEOUT_SECONDS", "APP_TIMEOUT_SECONDS")}, |
| 2223 | }, |
| 2224 | Action: func(_ context.Context, cmd *Command) error { |
| 2225 | assert.Equal(t, 15.5, cmd.Float("timeout"), "main name not set") |
| 2226 | assert.Equal(t, 15.5, cmd.Float("t"), "short name not set") |
| 2227 | return nil |
| 2228 | }, |
| 2229 | }).Run(buildTestContext(t), []string{"run"}) |
| 2230 | } |
| 2231 | |
| 2232 | func TestParseMultiFloat64SliceFromEnv(t *testing.T) { |
| 2233 | t.Setenv("APP_INTERVALS", "0.1,-10.5") |
nothing calls this directly
no test coverage detected