(t *testing.T)
| 1236 | } |
| 1237 | |
| 1238 | func TestUintSliceFlagApply_UsesEnvValues_noDefault(t *testing.T) { |
| 1239 | t.Setenv("MY_GOAT", "1 , 2") |
| 1240 | |
| 1241 | fl := &Uint64SliceFlag{Name: "goat", Sources: EnvVars("MY_GOAT")} |
| 1242 | cmd := &Command{ |
| 1243 | Flags: []Flag{ |
| 1244 | fl, |
| 1245 | }, |
| 1246 | } |
| 1247 | r := require.New(t) |
| 1248 | r.NoError(cmd.Run(buildTestContext(t), []string{""})) |
| 1249 | r.Equal([]uint64{1, 2}, cmd.Value("goat")) |
| 1250 | } |
| 1251 | |
| 1252 | func TestUintSliceFlagApply_UsesEnvValues_withDefault(t *testing.T) { |
| 1253 | t.Setenv("MY_GOAT", "1 , 2") |
nothing calls this directly
no test coverage detected