(args PositionalArgs, withValid bool)
| 21 | ) |
| 22 | |
| 23 | func getCommand(args PositionalArgs, withValid bool) *Command { |
| 24 | c := &Command{ |
| 25 | Use: "c", |
| 26 | Args: args, |
| 27 | Run: emptyRun, |
| 28 | } |
| 29 | if withValid { |
| 30 | c.ValidArgs = []string{"one", "two", "three"} |
| 31 | } |
| 32 | return c |
| 33 | } |
| 34 | |
| 35 | func expectSuccess(output string, err error, t *testing.T) { |
| 36 | if output != "" { |
no outgoing calls
no test coverage detected