TestRunGoodArgument ensures correct behaviour when running a valid plugin with an `--argument`.
(t *testing.T)
| 10 | |
| 11 | // TestRunGoodArgument ensures correct behaviour when running a valid plugin with an `--argument`. |
| 12 | func TestRunGoodArgument(t *testing.T) { |
| 13 | run, _, cleanup := prepare(t) |
| 14 | defer cleanup() |
| 15 | |
| 16 | res := icmd.RunCmd(run("helloworld", "--who", "Cleveland")) |
| 17 | res.Assert(t, icmd.Expected{ |
| 18 | ExitCode: 0, |
| 19 | Out: "Hello Cleveland", |
| 20 | }) |
| 21 | } |
| 22 | |
| 23 | // TestClashWithGlobalArgs ensures correct behaviour when a plugin |
| 24 | // has an argument with the same name as one of the globals. |