Verified Commit 0d117360 authored by Camil Staps's avatar Camil Staps 🚀

Add --options to Testing.Options to avoid -O sequences

parent 84d7d946
Pipeline #27768 passed with stage
in 3 minutes and 16 seconds
......@@ -7,6 +7,7 @@ from Data.Func import $
import Data.GenDefault
import Data.Maybe
import System.Options
import Text
derive gDefault TestOptions, TestRun
......@@ -24,6 +25,14 @@ testOptionDescription = WithHelp True $ Options
Ok {opts & runs=init rs ++ [{r & options=r.options ++ [opt]}]})
"OPT"
"Add OPT to the options of the previously added test"
, Option
"--options"
(\optstring opts -> case opts.runs of
[] -> Error ["--options used before --run"]
rs -> let r = last rs in
Ok {opts & runs=init rs ++ [{r & options=r.options ++ split ";" optstring}]})
"'OPT;OPT;OPT'"
"Add the semicolon-separated OPTs to the options of the previously added test"
, Shorthand "-r" "--run" $ Option
"--run"
(\r opts -> Ok {opts & runs=opts.runs ++ [{name=r, options=[]}]})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment