Commit d62f20728d
Verified · cmc ci/build: success ci/test: success
e2e/cli_test.go +7 −3
| @@ -146,11 +146,15 @@ func TestCLI(t *testing.T) { | ||
| 146 | 146 | mustGit(t, dir, cliGitEnv, "add", ".") |
| 147 | 147 | mustGit(t, dir, cliGitEnv, "commit", "-q", "-m", "feature work") |
| 148 | 148 | mustGit(t, dir, cliGitEnv, "push", "-q", "origin", "feature") |
| 149 | // A noun's --help is the server's reference for that noun, flags | |
| 150 | // included, not cobra's flagless subcommand list (#130). | |
| 151 | if out := c.must(t, dir, "", "issue", "--help"); !strings.Contains(out, "issue create <owner/name>") { | |
| 149 | // A noun's --help is the server's reference for that noun, not | |
| 150 | // cobra's flagless subcommand list (#130); a verb's --help carries | |
| 151 | // its flags. | |
| 152 | if out := c.must(t, dir, "", "issue", "--help"); !strings.Contains(out, "WRITE\n") || !strings.Contains(out, "issue <verb> --help for flags.") { | |
| 152 | 153 | t.Fatalf("issue --help is not the server's reference:\n%s", out) |
| 153 | 154 | } |
| 155 | if out := c.must(t, dir, "", "issue", "create", "--help"); !strings.Contains(out, "issue create <owner/name>") || !strings.Contains(out, "--title <t>") { | |
| 156 | t.Fatalf("issue create --help carries no flags:\n%s", out) | |
| 157 | } | |
| 154 | 158 | |
| 155 | 159 | // Inside the clone on the branch, --source is the checked-out branch |
| 156 | 160 | // and --target the default branch; neither needs typing (#101). |