summaryrefslogtreecommitdiff
path: root/Omni
diff options
context:
space:
mode:
authorOmni Worker <bot@omni.agent>2025-11-21 05:32:39 -0500
committerOmni Worker <bot@omni.agent>2025-11-21 06:19:16 -0500
commit33a53be60bfcc60bb21b9aa4b4147a88bfb1b499 (patch)
tree29ebd7c68ea761403fcd87c97915a167bdb4836f /Omni
parent392d15ad0f2fa3f3704b9bd1b41f50165f96e508 (diff)
feat: implement t-rWa5yilwM.4
Diffstat (limited to 'Omni')
-rw-r--r--Omni/Agent.hs14
1 files changed, 13 insertions, 1 deletions
diff --git a/Omni/Agent.hs b/Omni/Agent.hs
index af785eb..d53bccd 100644
--- a/Omni/Agent.hs
+++ b/Omni/Agent.hs
@@ -13,6 +13,7 @@ import qualified Omni.Agent.Core as Core
import qualified Omni.Agent.Worker as Worker
import qualified Omni.Cli as Cli
import qualified Omni.Test as Test
+import qualified System.Console.Docopt as Docopt
main :: IO ()
main = Cli.main plan
@@ -62,4 +63,15 @@ move args
| otherwise = putStrLn (Cli.usage help)
test :: Test.Tree
-test = Test.group "Omni.Agent" []
+test = Test.group "Omni.Agent" [unitTests]
+
+unitTests :: Test.Tree
+unitTests =
+ Test.group
+ "Unit tests"
+ [ Test.unit "can parse start command" <| do
+ let result = Docopt.parseArgs help ["start", "worker-1"]
+ case result of
+ Left err -> Test.assertFailure <| "Failed to parse 'start': " <> show err
+ Right args -> args `Cli.has` Cli.command "start" Test.@?= True
+ ]