(t *testing.T)
| 1923 | } |
| 1924 | |
| 1925 | func TestParseMultiStringSliceWithDefaultsUnset(t *testing.T) { |
| 1926 | _ = (&Command{ |
| 1927 | Flags: []Flag{ |
| 1928 | &StringSliceFlag{Name: "serve", Aliases: []string{"s"}, Value: []string{"9", "2"}}, |
| 1929 | }, |
| 1930 | Action: func(_ context.Context, cmd *Command) error { |
| 1931 | expected := []string{"9", "2"} |
| 1932 | assert.Equal(t, expected, cmd.StringSlice("serve"), "main name not set") |
| 1933 | assert.Equal(t, expected, cmd.StringSlice("s"), "short name not set") |
| 1934 | return nil |
| 1935 | }, |
| 1936 | }).Run(buildTestContext(t), []string{"run"}) |
| 1937 | } |
| 1938 | |
| 1939 | func TestParseMultiStringSliceFromEnv(t *testing.T) { |
| 1940 | t.Setenv("APP_INTERVALS", "20,30,40") |
nothing calls this directly
no test coverage detected