@@ -257,6 +257,29 @@ func TestIntSliceApplyInputSourceMethodEnvVarSet(t *testing.T) {
257
257
refute (t , c .IntSlice ("test" ), []int {3 , 4 })
258
258
}
259
259
260
+ func TestInt64SliceFlagApplyInputSourceValue (t * testing.T ) {
261
+ dest := cli .NewInt64Slice ()
262
+ tis := testApplyInputSource {
263
+ Flag : NewInt64SliceFlag (& cli.Int64SliceFlag {Name : "test" , Destination : dest }),
264
+ FlagName : "test" ,
265
+ MapValue : []interface {}{int64 (1 ), int64 (2 )},
266
+ }
267
+ c := runTest (t , tis )
268
+ expect (t , c .Int64Slice ("test" ), []int64 {1 , 2 })
269
+ expect (t , dest .Value (), []int64 {1 , 2 })
270
+
271
+ // reset dest
272
+ dest = cli .NewInt64Slice ()
273
+ tis = testApplyInputSource {
274
+ Flag : NewInt64SliceFlag (& cli.Int64SliceFlag {Name : "test" , Destination : dest }),
275
+ FlagName : "test" ,
276
+ MapValue : []interface {}{int64 (1 ), int64 (2 )},
277
+ }
278
+ c = runRacyTest (t , tis )
279
+ refute (t , c .IntSlice ("test" ), []int64 {1 , 2 })
280
+ refute (t , dest .Value (), []int64 {1 , 2 })
281
+ }
282
+
260
283
func TestBoolApplyInputSourceMethodSet (t * testing.T ) {
261
284
tis := testApplyInputSource {
262
285
Flag : NewBoolFlag (& cli.BoolFlag {Name : "test" }),
0 commit comments