(t *testing.T)
| 1633 | } |
| 1634 | |
| 1635 | func TestFloat64SliceFlagApply_ParentCommand(t *testing.T) { |
| 1636 | _ = (&Command{ |
| 1637 | Flags: []Flag{ |
| 1638 | &FloatSliceFlag{Name: "numbers", Aliases: []string{"n"}, Value: []float64{1.0, 2.0, 3.0}}, |
| 1639 | }, |
| 1640 | Commands: []*Command{ |
| 1641 | { |
| 1642 | Name: "child", |
| 1643 | Action: func(_ context.Context, cmd *Command) error { |
| 1644 | require.Equalf(t, []float64{1.0, 2.0, 3.0}, cmd.FloatSlice("numbers"), "child context unable to view parent flag") |
| 1645 | return nil |
| 1646 | }, |
| 1647 | }, |
| 1648 | }, |
| 1649 | }).Run(buildTestContext(t), []string{"run", "child"}) |
| 1650 | } |
| 1651 | |
| 1652 | var genericFlagTests = []struct { |
| 1653 | name string |
nothing calls this directly
no test coverage detected