From cd4b94ad3beb2063fa6b3b8efacdca9bfeeb45e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 16 May 2024 22:17:05 +0200 Subject: Describe command-line test selection in help text Changelog: Documentation and helptext updates --- src/Main.hs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index eb34c62..f296a12 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -47,7 +47,7 @@ options = (ReqArg (\str -> to $ \opts -> case break (==':') str of (path, []) -> opts { optDefaultTool = path } (pname, (_:path)) -> opts { optProcTools = (ProcName (T.pack pname), path) : optProcTools opts } - ) "PATH") + ) "") "test tool to be used" , Option ['v'] ["verbose"] (NoArg (\opts -> opts { optVerbose = True })) @@ -55,7 +55,7 @@ options = , Option ['t'] ["timeout"] (ReqArg (\str -> to $ \opts -> case readMaybe str of Just timeout -> opts { optTimeout = timeout } - Nothing -> error "timeout must be a number") "SECONDS") + Nothing -> error "timeout must be a number") "") "default timeout in seconds with microsecond precision" , Option ['g'] ["gdb"] (NoArg $ to $ \opts -> opts { optGDB = True }) @@ -67,7 +67,7 @@ options = (NoArg $ to $ \opts -> opts { optKeep = True }) "keep test directory even if all tests succeed" , Option ['r'] ["repeat"] - (ReqArg (\str opts -> opts { optRepeat = read str }) "COUNT") + (ReqArg (\str opts -> opts { optRepeat = read str }) "") "number of times to repeat the test(s)" , Option [] ["wait"] (NoArg $ to $ \opts -> opts { optWait = True }) @@ -106,7 +106,13 @@ main = do exitFailure when (optShowHelp opts) $ do - let header = "Usage: erebos-tester [OPTION...]" + let header = unlines + [ "Usage: erebos-tester [