diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-08 09:58:02 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-08 09:58:02 +0300 |
| commit | 8e351c86502cea78f1f0b3aa19cde7ca702bacab (patch) | |
| tree | 1340e27219255b0ebe49bdbe3b5c2fbd95df8810 /internal/askcli/dispatch_test.go | |
| parent | 9e8f558a1f6fcdb09a8a02dfcd2e3d8fc9ce613f (diff) | |
Rename task CLI from ask to do
- Move cmd/ask to cmd/do; mage BuildDo builds binary named do
- Update askcli help text, errors, Fish completion (complete -c do, __do_*)
- Task alias cache path: XDG cache hexai/do/task-aliases-v2.json
- Refresh README and docs; go install path cmd/do@latest
- Remove accidentally tracked cmd/ask build artifact; ignore cmd/do/do and cmd/do/ask
Made-with: Cursor
Diffstat (limited to 'internal/askcli/dispatch_test.go')
| -rw-r--r-- | internal/askcli/dispatch_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/askcli/dispatch_test.go b/internal/askcli/dispatch_test.go index e027b43..90c1b99 100644 --- a/internal/askcli/dispatch_test.go +++ b/internal/askcli/dispatch_test.go @@ -23,19 +23,19 @@ func TestDispatcher_Help(t *testing.T) { t.Fatalf("help returned error: %v", err) } output := stdout.String() - if !strings.Contains(output, "ask - task management CLI") { + if !strings.Contains(output, "do - task management CLI") { t.Fatalf("help missing title: %s", output) } - if !strings.Contains(output, "ask na <subcommand...>") || !strings.Contains(output, "ask no-agent <subcommand...>") { + if !strings.Contains(output, "do na <subcommand...>") || !strings.Contains(output, "do no-agent <subcommand...>") { t.Fatalf("help missing no-agent scope prefixes: %s", output) } - if !strings.Contains(output, "ask list") { + if !strings.Contains(output, "do list") { t.Fatalf("help missing list subcommand: %s", output) } - if !strings.Contains(output, "ask all") { + if !strings.Contains(output, "do all") { t.Fatalf("help missing all subcommand: %s", output) } - if !strings.Contains(output, "ask fish") { + if !strings.Contains(output, "do fish") { t.Fatalf("help missing fish subcommand: %s", output) } } @@ -96,8 +96,8 @@ func TestDispatcher_LongHelp(t *testing.T) { d.Dispatch(context.Background(), []string{"help"}, nil, &stdout, io.Discard) output := stdout.String() for _, sub := range []string{"add", "list", "all", "ready", "info", "annotate", "start", "stop", "done", "priority", "tag", "dep", "urgency", "modify", "denotate", "delete", "fish"} { - if !strings.Contains(output, "ask "+sub) { - t.Errorf("help missing subcommand: ask %s", sub) + if !strings.Contains(output, "do "+sub) { + t.Errorf("help missing subcommand: do %s", sub) } } } @@ -137,7 +137,7 @@ func TestDispatcher_FishSubcommandRejectsExtraArgs(t *testing.T) { if stdout.Len() != 0 { t.Fatalf("fish extra args wrote unexpected stdout: %q", stdout.String()) } - if got := stderr.String(); !strings.Contains(got, "usage: ask fish") { + if got := stderr.String(); !strings.Contains(got, "usage: do fish") { t.Fatalf("fish extra args stderr = %q, want usage", got) } } |
