mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-30 12:17:56 +00:00
Add processSingleTest, remove file arg from processCategory
This commit is contained in:
@@ -375,8 +375,14 @@ proc `&.?`(a, b: string): string =
|
||||
proc `&?.`(a, b: string): string =
|
||||
# candidate for the stdlib?
|
||||
result = if a.endswith(b): a else: a & b
|
||||
|
||||
proc processSingleTest(r: var TResults, cat: Category, options, test: string) =
|
||||
let test = "tests" & DirSep &.? cat.string / test
|
||||
|
||||
proc processCategory(r: var TResults, cat: Category, options: string, fileGlob: string = "t*.nim") =
|
||||
if existsFile(test): testSpec r, makeTest(test, options, cat)
|
||||
else: echo "[Warning] - ", test, " test does not exist"
|
||||
|
||||
proc processCategory(r: var TResults, cat: Category, options: string) =
|
||||
case cat.string.normalize
|
||||
of "rodfiles":
|
||||
when false: compileRodFiles(r, cat, options)
|
||||
@@ -417,5 +423,5 @@ proc processCategory(r: var TResults, cat: Category, options: string, fileGlob:
|
||||
# We can't test it because it depends on a third party.
|
||||
discard # TODO: Move untestable tests to someplace else, i.e. nimble repo.
|
||||
else:
|
||||
for name in os.walkFiles("tests" & DirSep &.? cat.string / fileGlob):
|
||||
for name in os.walkFiles("tests" & DirSep &.? cat.string / "t*.nim"):
|
||||
testSpec r, makeTest(name, options, cat)
|
||||
|
||||
Reference in New Issue
Block a user