summaryrefslogtreecommitdiff
path: root/tests/SomhairlesDream.Cli.Tests/ArgumentsTests.fs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/SomhairlesDream.Cli.Tests/ArgumentsTests.fs')
-rw-r--r--tests/SomhairlesDream.Cli.Tests/ArgumentsTests.fs27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/SomhairlesDream.Cli.Tests/ArgumentsTests.fs b/tests/SomhairlesDream.Cli.Tests/ArgumentsTests.fs
index f55762e..38c8741 100644
--- a/tests/SomhairlesDream.Cli.Tests/ArgumentsTests.fs
+++ b/tests/SomhairlesDream.Cli.Tests/ArgumentsTests.fs
@@ -60,6 +60,33 @@ let ``run command parses explicit ids and render flag`` () =
| Help -> failwith "expected run command"
[<Fact>]
+let ``run command with probe design applies probe defaults`` () =
+ match Arguments.parse [| "run"; "--design"; "probe" |] |> expectOk with
+ | Run options ->
+ Assert.Equal("probe-001", options.Ids.ProjectId)
+ Assert.Equal("run-001", options.Ids.RunId)
+ Assert.Equal("probe-base-000", options.Ids.BaseId)
+ Assert.Equal("probe-target-007", options.Ids.TargetId)
+ Assert.Equal("probe", options.Design)
+ | Verify _
+ | Help -> failwith "expected run command"
+
+[<Fact>]
+let ``run command with probe design keeps explicit ids`` () =
+ match Arguments.parse [| "run"; "--design"; "probe"; "--run-id"; "run-x" |] |> expectOk with
+ | Run options ->
+ Assert.Equal("probe-001", options.Ids.ProjectId)
+ Assert.Equal("run-x", options.Ids.RunId)
+ Assert.Equal("probe-base-000", options.Ids.BaseId)
+ | Verify _
+ | Help -> failwith "expected run command"
+
+[<Fact>]
+let ``run command rejects unknown design`` () =
+ match Arguments.parse [| "run"; "--design"; "steampunk" |] |> expectError with
+ | message -> Assert.Contains("invalid design", message)
+
+[<Fact>]
let ``verify command requires exactly one manifest path`` () =
match Arguments.parse [| "verify"; "run"; "extra" |] |> expectError with
| message -> Assert.Contains("manifest", message)