(t *testing.T)
| 2258 | } |
| 2259 | |
| 2260 | func TestParseMultiBool(t *testing.T) { |
| 2261 | _ = (&Command{ |
| 2262 | Flags: []Flag{ |
| 2263 | &BoolFlag{Name: "serve", Aliases: []string{"s"}}, |
| 2264 | }, |
| 2265 | Action: func(_ context.Context, cmd *Command) error { |
| 2266 | assert.True(t, cmd.Bool("serve"), "main name not set") |
| 2267 | assert.True(t, cmd.Bool("s"), "short name not set") |
| 2268 | return nil |
| 2269 | }, |
| 2270 | }).Run(buildTestContext(t), []string{"run", "--serve"}) |
| 2271 | } |
| 2272 | |
| 2273 | func TestParseBoolShortOptionHandle(t *testing.T) { |
| 2274 | _ = (&Command{ |
nothing calls this directly
no test coverage detected