Commit b3c4de5a authored by Steffen Michels's avatar Steffen Michels

Merge branch 'add-semicolon-separated-options-to-Testing.Options' into 'master'

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

See merge request !263
parents 84d7d946 0d117360
Pipeline #28100 passed with stage
......@@ -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]}]})
"Add OPT to the options of the previously added test"
, Option
(\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}]})
"Add the semicolon-separated OPTs to the options of the previously added test"
, Shorthand "-r" "--run" $ Option
(\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