summaryrefslogtreecommitdiff
path: root/Omni/Task.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Task.hs')
-rw-r--r--Omni/Task.hs13
1 files changed, 11 insertions, 2 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs
index eeca4c6..6d2da71 100644
--- a/Omni/Task.hs
+++ b/Omni/Task.hs
@@ -38,7 +38,7 @@ task
Usage:
task init [--quiet]
- task create <title> [--type=<type>] [--parent=<id>] [--priority=<p>] [--deps=<ids>] [--dep-type=<type>] [--discovered-from=<id>] [--namespace=<ns>] [--json]
+ task create <title> [options]
task list [options]
task ready [--json]
task show <id> [--json]
@@ -453,5 +453,14 @@ cliTests =
let result = Docopt.parseArgs help ["sync"]
case result of
Left err -> Test.assertFailure <| "Failed to parse 'sync': " <> show err
- Right args -> args `Cli.has` Cli.command "sync" Test.@?= True
+ Right args -> args `Cli.has` Cli.command "sync" Test.@?= True,
+ Test.unit "create with flags in different order" <| do
+ let result = Docopt.parseArgs help ["create", "Test", "--json", "--priority=1", "--namespace=Omni/Task"]
+ case result of
+ Left err -> Test.assertFailure <| "Failed to parse 'create' with reordered flags: " <> show err
+ Right args -> do
+ args `Cli.has` Cli.command "create" Test.@?= True
+ args `Cli.has` Cli.longOption "json" Test.@?= True
+ Cli.getArg args (Cli.longOption "priority") Test.@?= Just "1"
+ Cli.getArg args (Cli.longOption "namespace") Test.@?= Just "Omni/Task"
]