diff options
| author | Omni Worker <bot@omni.agent> | 2025-11-21 05:32:39 -0500 |
|---|---|---|
| committer | Omni Worker <bot@omni.agent> | 2025-11-21 06:19:16 -0500 |
| commit | 33a53be60bfcc60bb21b9aa4b4147a88bfb1b499 (patch) | |
| tree | 29ebd7c68ea761403fcd87c97915a167bdb4836f /Omni/Agent.hs | |
| parent | 392d15ad0f2fa3f3704b9bd1b41f50165f96e508 (diff) | |
feat: implement t-rWa5yilwM.4
Diffstat (limited to 'Omni/Agent.hs')
| -rw-r--r-- | Omni/Agent.hs | 14 |
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 + ] |
