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/command_write_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/askcli/command_write_test.go') diff --git a/internal/askcli/command_write_test.go b/internal/askcli/command_write_test.go index 3b9d937..f0e062d 100644 --- a/internal/askcli/command_write_test.go +++ b/internal/askcli/command_write_test.go @@ -201,14 +201,14 @@ func TestAllWriteHandlers_PassCorrectArgs(t *testing.T) { args []string wantArgs []string }{ - {"denotate", []string{"denotate", "my-uuid", "text"}, []string{"denotate", "my-uuid", "text"}}, + {"denotate", []string{"denotate", "my-uuid", "text"}, []string{"uuid:my-uuid", "denotate", "text"}}, {"modify", []string{"modify", "my-uuid", "priority:H"}, []string{"modify", "my-uuid", "priority:H"}}, {"annotate", []string{"annotate", "my-uuid", "note"}, []string{"annotate", "my-uuid", "note"}}, {"start", []string{"start", "my-uuid"}, []string{"start", "my-uuid"}}, {"stop", []string{"stop", "my-uuid"}, []string{"stop", "my-uuid"}}, {"done", []string{"done", "my-uuid"}, []string{"done", "my-uuid"}}, - {"priority", []string{"priority", "my-uuid", "H"}, []string{"priority", "my-uuid", "H"}}, - {"tag", []string{"tag", "my-uuid", "+cli"}, []string{"tag", "my-uuid", "+cli"}}, + {"priority", []string{"priority", "my-uuid", "H"}, []string{"uuid:my-uuid", "modify", "priority:H"}}, + {"tag", []string{"tag", "my-uuid", "+cli"}, []string{"uuid:my-uuid", "modify", "+cli"}}, } for _, tc := range testCases { -- cgit v1.2.3