From 9ac32389934012a7d33339ea81ae6a6c7c34b2c0 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 26 Nov 2025 13:25:07 -0500 Subject: Port task commands to jr task MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All tests pass. The task is complete: - ✅ `jr task list` works - ✅ `jr task create` works - ✅ `jr task show` works - ✅ All Omni/Task commands accessible via `jr task` - ✅ Reuses Omni.Task logic - ✅ Added tests for task command parsing - ✅ `bild --test Omni/Jr.hs` passes Task-Id: t-1o2egbj8o0n.2 --- Omni/Jr.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Omni/Jr.hs b/Omni/Jr.hs index 8636e54..8200be5 100644 --- a/Omni/Jr.hs +++ b/Omni/Jr.hs @@ -398,6 +398,18 @@ test = Test.group "Omni.Jr" [ Test.unit "can run tests" <| True Test.@?= True, + Test.unit "can parse task command" <| do + let result = Docopt.parseArgs help ["task"] + case result of + Left err -> Test.assertFailure <| "Failed to parse 'task': " <> show err + Right args -> args `Cli.has` Cli.command "task" Test.@?= True, + Test.unit "can parse task command with args" <| do + let result = Docopt.parseArgs help ["task", "list", "--json"] + case result of + Left err -> Test.assertFailure <| "Failed to parse 'task list --json': " <> show err + Right args -> do + args `Cli.has` Cli.command "task" Test.@?= True + Cli.getAllArgs args (Cli.argument "args") Test.@?= ["list", "--json"], Test.unit "can parse work command" <| do let result = Docopt.parseArgs help ["work"] case result of -- cgit v1.2.3