Commit d62f20728d

d62f20728de0e6db02ed0c5f5a6e7b2f0fc8605b

parent: a9633bdd35

Verified · cmc ci/build: success ci/test: success

cmc <hello@cleberg.net> · 2026-09-24 14:58 UTC

e2e: noun help lists verbs, verb help carries flags

Ref #254
e2e/cli_test.go +7 −3
@@ -146,11 +146,15 @@ func TestCLI(t *testing.T) {
146146 mustGit(t, dir, cliGitEnv, "add", ".")
147147 mustGit(t, dir, cliGitEnv, "commit", "-q", "-m", "feature work")
148148 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.") {
152153 t.Fatalf("issue --help is not the server's reference:\n%s", out)
153154 }
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 }
154158
155159 // Inside the clone on the branch, --source is the checked-out branch
156160 // and --target the default branch; neither needs typing (#101).