MCPcopy
hub / github.com/urfave/cli / TestIntSliceFlagValueFromCommand

Function TestIntSliceFlagValueFromCommand

flag_test.go:1175–1186  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1173}
1174
1175func TestIntSliceFlagValueFromCommand(t *testing.T) {
1176 f := &Int64SliceFlag{Name: "myflag"}
1177 cmd := &Command{
1178 Flags: []Flag{
1179 f,
1180 },
1181 }
1182 require.NoError(t, cmd.Set("myflag", "1"))
1183 require.NoError(t, cmd.Set("myflag", "2"))
1184 require.NoError(t, cmd.Set("myflag", "3"))
1185 require.Equal(t, []int64{1, 2, 3}, cmd.Int64Slice(f.Name))
1186}
1187
1188var uintSliceFlagTests = []struct {
1189 name string

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
Int64SliceMethod · 0.95

Tested by

no test coverage detected