(t *testing.T)
| 2105 | } |
| 2106 | |
| 2107 | func TestParseMultiIntSliceWithDefaultsUnset(t *testing.T) { |
| 2108 | _ = (&Command{ |
| 2109 | Flags: []Flag{ |
| 2110 | &Int64SliceFlag{Name: "serve", Aliases: []string{"s"}, Value: []int64{9, 2}}, |
| 2111 | }, |
| 2112 | Action: func(_ context.Context, cmd *Command) error { |
| 2113 | expected := []int64{9, 2} |
| 2114 | assert.Equal(t, expected, cmd.Int64Slice("serve"), "main name not set") |
| 2115 | assert.Equal(t, expected, cmd.Int64Slice("s"), "short name not set") |
| 2116 | return nil |
| 2117 | }, |
| 2118 | }).Run(buildTestContext(t), []string{"run"}) |
| 2119 | } |
| 2120 | |
| 2121 | func TestParseMultiIntSliceFromEnv(t *testing.T) { |
| 2122 | t.Setenv("APP_INTERVALS", "20,30,40") |
nothing calls this directly
no test coverage detected