(t *testing.T)
| 1846 | } |
| 1847 | |
| 1848 | func TestParseMultiStringSliceWithDefaults(t *testing.T) { |
| 1849 | _ = (&Command{ |
| 1850 | Flags: []Flag{ |
| 1851 | &StringSliceFlag{Name: "serve", Aliases: []string{"s"}, Value: []string{"9", "2"}}, |
| 1852 | }, |
| 1853 | Action: func(_ context.Context, cmd *Command) error { |
| 1854 | expected := []string{"10", "20"} |
| 1855 | assert.Equal(t, expected, cmd.StringSlice("serve"), "main name not set") |
| 1856 | assert.Equal(t, expected, cmd.StringSlice("s"), "short name not set") |
| 1857 | return nil |
| 1858 | }, |
| 1859 | }).Run(buildTestContext(t), []string{"run", "-s", "10", "-s", "20"}) |
| 1860 | } |
| 1861 | |
| 1862 | func TestParseMultiStringSliceWithDestination(t *testing.T) { |
| 1863 | dest := []string{} |
nothing calls this directly
no test coverage detected