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

Function TestUint64SliceFlag_SetFromParentCommand

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

Source from the content-addressed store, hash-verified

1446}
1447
1448func TestUint64SliceFlag_SetFromParentCommand(t *testing.T) {
1449 fl := &Uint64SliceFlag{Name: "numbers", Aliases: []string{"n"}, Value: []uint64{1, 2, 3, 4}}
1450 cmd := &Command{
1451 parent: &Command{
1452 Flags: []Flag{
1453 fl,
1454 },
1455 },
1456 }
1457 r := require.New(t)
1458 r.Equalf(
1459 []uint64{1, 2, 3, 4}, cmd.Uint64Slice("numbers"),
1460 "child context unable to view parent flag",
1461 )
1462}
1463
1464func TestUint64SliceFlag_ReturnNil(t *testing.T) {
1465 fl := &Uint64SliceFlag{}

Callers

nothing calls this directly

Calls 1

Uint64SliceMethod · 0.95

Tested by

no test coverage detected