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

Function TestUintSliceFlag_SetFromParentCommand

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

Source from the content-addressed store, hash-verified

1300}
1301
1302func TestUintSliceFlag_SetFromParentCommand(t *testing.T) {
1303 fl := &UintSliceFlag{Name: "numbers", Aliases: []string{"n"}, Value: []uint{1, 2, 3, 4}}
1304 cmd := &Command{
1305 parent: &Command{
1306 Flags: []Flag{
1307 fl,
1308 },
1309 },
1310 }
1311
1312 r := require.New(t)
1313 r.Equalf(
1314 []uint{1, 2, 3, 4},
1315 cmd.UintSlice("numbers"),
1316 "child context unable to view parent flag",
1317 )
1318}
1319
1320func TestUintSliceFlag_ReturnNil(t *testing.T) {
1321 fl := &Uint64SliceFlag{}

Callers

nothing calls this directly

Calls 1

UintSliceMethod · 0.95

Tested by

no test coverage detected