summary refs log tree commit diff stats
path: root/testament/categories.nim
diff options
context:
space:
mode:
Diffstat (limited to 'testament/categories.nim')
-rw-r--r--testament/categories.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/testament/categories.nim b/testament/categories.nim
index 745abebe3..d5cf79e3a 100644
--- a/testament/categories.nim
+++ b/testament/categories.nim
@@ -717,3 +717,15 @@ proc processCategory(r: var TResults, cat: Category,
       inc testsRun
     if testsRun == 0:
       echo "[Warning] - Invalid category specified \"", cat.string, "\", no tests were run"
+
+proc processPattern(r: var TResults, pattern, options: string; simulate: bool) =
+  var testsRun = 0
+  for name in walkPattern(pattern):
+    if simulate:
+      echo "Detected test: ", name
+    else:
+      var test = makeTest(name, options, Category"pattern")
+      testSpec r, test
+    inc testsRun
+  if testsRun == 0:
+    echo "no tests were found for pattern: ", pattern