allow multiple (and-ed) filters
This commit is contained in:
parent
28f0546903
commit
46d94df444
2 changed files with 25 additions and 18 deletions
|
@ -36,10 +36,10 @@ record Options where
|
|||
||| which TAP version to output
|
||||
version : TAPVersion
|
||||
||| `-F`, `--filter`:
|
||||
||| search for a substring in test or group names.
|
||||
||| if it is present in a group name then all subtests are run
|
||||
||| regardless of their own names
|
||||
pattern : Maybe String
|
||||
||| search for substrings in test or group names.
|
||||
||| if there are several, then each must be present somewhere in the
|
||||
||| test's name or in the name of one of its parent groups
|
||||
pattern : List String
|
||||
||| `-c`, `--color`, `--colour`:
|
||||
||| colour code test results and a few other things.
|
||||
||| this is not TAP compliant so it is off by default.
|
||||
|
@ -54,7 +54,7 @@ export
|
|||
defaultOpts : Options
|
||||
defaultOpts = Opts {
|
||||
version = V13,
|
||||
pattern = Nothing,
|
||||
pattern = [],
|
||||
color = False,
|
||||
skipComments = False
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ setTapVer ver opts =
|
|||
|
||||
private
|
||||
setFilter : String -> Mod
|
||||
setFilter str opts = pure $ {pattern := Just str} opts
|
||||
setFilter str opts = pure $ {pattern $= (str ::)} opts
|
||||
|
||||
parameters (header : String)
|
||||
mutual
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue