summary refs log tree commit diff stats
path: root/lib/pure/unittest.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-03-30 02:32:29 +0200
committerAraq <rumpf_a@web.de>2018-03-30 02:32:29 +0200
commita9691aeef513ea20a9b1735f37172a1bd66a80dd (patch)
tree2d0de165d9907a3a8a4b56cea5bb33a3fb201465 /lib/pure/unittest.nim
parent9de05ec3e04e8a2321b29896fe9fa7db4c6e65f3 (diff)
parent325d76b56a5b26ba2d5ce065574eb6ef736eb179 (diff)
downloadNim-a9691aeef513ea20a9b1735f37172a1bd66a80dd.tar.gz
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'lib/pure/unittest.nim')
-rw-r--r--lib/pure/unittest.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim
index fbce087ff..0034d0c60 100644
--- a/lib/pure/unittest.nim
+++ b/lib/pure/unittest.nim
@@ -150,6 +150,7 @@ var
   checkpoints {.threadvar.}: seq[string]
   formatters {.threadvar.}: seq[OutputFormatter]
   testsFilters {.threadvar.}: HashSet[string]
+  disabledParamFiltering {.threadvar.}: bool
 
 when declared(stdout):
   abortOnError = existsEnv("NIMTEST_ABORT_ON_ERROR")
@@ -379,7 +380,7 @@ proc ensureInitialized() =
   if formatters == nil:
     formatters = @[OutputFormatter(defaultConsoleFormatter())]
 
-  if not testsFilters.isValid:
+  if not disabledParamFiltering and not testsFilters.isValid:
     testsFilters.init()
     when declared(paramCount):
       # Read tests to run from the command line.
@@ -701,3 +702,7 @@ macro expect*(exceptions: varargs[typed], body: untyped): untyped =
     errorTypes.add(exp[i])
 
   result = getAst(expectBody(errorTypes, exp.lineinfo, body))
+
+proc disableParamFiltering* =
+  ## disables filtering tests with the command line params
+  disabledParamFiltering = true