(t *testing.T)
| 1250 | } |
| 1251 | |
| 1252 | func TestUintSliceFlagApply_UsesEnvValues_withDefault(t *testing.T) { |
| 1253 | t.Setenv("MY_GOAT", "1 , 2") |
| 1254 | val := NewUint64Slice(3, 4) |
| 1255 | fl := &Uint64SliceFlag{Name: "goat", Sources: EnvVars("MY_GOAT"), Value: val.Value()} |
| 1256 | cmd := &Command{ |
| 1257 | Flags: []Flag{ |
| 1258 | fl, |
| 1259 | }, |
| 1260 | } |
| 1261 | r := require.New(t) |
| 1262 | r.NoError(cmd.Run(buildTestContext(t), []string{""})) |
| 1263 | r.Equal([]uint64{3, 4}, val.Value()) |
| 1264 | r.Equal([]uint64{1, 2}, cmd.Value("goat")) |
| 1265 | } |
| 1266 | |
| 1267 | func TestUintSliceFlagApply_DefaultValueWithDestination(t *testing.T) { |
| 1268 | defValue := []uint64{1, 2} |
nothing calls this directly
no test coverage detected