From 97cb0462aad67bf1e9558b340f5ef2f5a72eb662 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 22 Mar 2026 19:45:02 +0200 Subject: Implement 'ask delete' subcommand: forward to Taskwarrior, suppress output, print UUID+success --- internal/askcli/dispatch_test.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'internal/askcli/dispatch_test.go') diff --git a/internal/askcli/dispatch_test.go b/internal/askcli/dispatch_test.go index f4c27a4..d2a4e52 100644 --- a/internal/askcli/dispatch_test.go +++ b/internal/askcli/dispatch_test.go @@ -59,7 +59,10 @@ func TestDispatcher_LongHelp(t *testing.T) { } func TestDispatcher_AllSubcommandsReachExecutor(t *testing.T) { - subcommands := []string{"add", "list", "info", "annotate", "start", "stop", "done", "priority", "tag", "dep", "urgency", "modify", "denotate", "delete", "export"} + subcommands := []string{"add", "list", "info", "annotate", "start", "stop", "done", "priority", "tag", "dep", "urgency", "modify", "denotate", "export"} + subcommandArgs := map[string][]string{ + "delete": {"delete", "test-uuid"}, + } for _, sub := range subcommands { var stdout, stderr bytes.Buffer calls := 0 @@ -67,7 +70,11 @@ func TestDispatcher_AllSubcommandsReachExecutor(t *testing.T) { calls++ return 0, nil }}) - code, _ := d.Dispatch(context.Background(), []string{sub}, nil, &stdout, &stderr) + args := []string{sub} + if extra, ok := subcommandArgs[sub]; ok { + args = extra + } + code, _ := d.Dispatch(context.Background(), args, nil, &stdout, &stderr) if code != 0 { t.Errorf("subcommand %q code = %d, want 0", sub, code) } -- cgit v1.2.3