From f6ce62d4e5cefc4a7761bbb86f329ad08ba57570 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 22 Mar 2026 22:21:44 +0200 Subject: ask: fix CLI commands to use correct Taskwarrior argument formats - handlePriority: use 'uuid: modify priority:' instead of 'priority ' - handleTag: use 'uuid: modify +/-tag' instead of 'tag +/-tag' - handleDelete: use 'uuid: delete' and pass stdin for confirmation - handleDenotate: use 'uuid: denotate ' instead of 'denotate ' - Add integration tests for all ask CLI subcommands - Update unit tests to match new command argument formats - createTask now uses task info to get UUID instead of export parsing - parseTaskInfoText fixed to split tags by ', ' instead of whitespace --- internal/askcli/dispatch_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'internal/askcli/dispatch_test.go') diff --git a/internal/askcli/dispatch_test.go b/internal/askcli/dispatch_test.go index 005a88c..1586447 100644 --- a/internal/askcli/dispatch_test.go +++ b/internal/askcli/dispatch_test.go @@ -28,9 +28,6 @@ func TestDispatcher_Help(t *testing.T) { if !strings.Contains(output, "ask all") { t.Fatalf("help missing all subcommand: %s", output) } - if !strings.Contains(output, "Filters:") { - t.Fatalf("help missing Filters section: %s", output) - } } func TestDispatcher_UnknownSubcommand(t *testing.T) { @@ -54,7 +51,7 @@ func TestDispatcher_LongHelp(t *testing.T) { var stdout bytes.Buffer 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", "export"} { + for _, sub := range []string{"add", "list", "all", "ready", "info", "annotate", "start", "stop", "done", "priority", "tag", "dep", "urgency", "modify", "denotate", "delete"} { if !strings.Contains(output, "ask "+sub) { t.Errorf("help missing subcommand: ask %s", sub) } @@ -62,7 +59,7 @@ func TestDispatcher_LongHelp(t *testing.T) { } func TestDispatcher_AllSubcommandsReachExecutor(t *testing.T) { - subcommands := []string{"export"} + subcommands := []string{} subcommandArgs := map[string][]string{ "delete": {"delete", "test-uuid"}, "denotate": {"denotate", "test-uuid", "text"}, -- cgit v1.2.3