make testament a tool we ship with Nim; fixes #12084 (#12088)

* make testament a tool we ship with Nim; fixes #12084
* moved config to fit
* adapt testament tests to use the testament binary
This commit is contained in:
Andreas Rumpf 2019-08-30 15:43:07 +02:00 • committed by GitHub
commit 82d5e773e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 10 deletions

View file

@ -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