diff options
author | Wh1teDuke <Wh1teDuke@users.noreply.github.com> | 2016-09-19 16:24:15 +0200 |
---|---|---|
committer | Wh1teDuke <Wh1teDuke@users.noreply.github.com> | 2016-09-19 16:24:15 +0200 |
commit | ddb70d33f814619333e475975c6dbe6e39e5d035 (patch) | |
tree | 1cbf0a6b420b6576bbb0ef51ab871f1cda8d9234 | |
parent | 8386476592a1fafea7f62d18604ac8534f9b1834 (diff) | |
download | Nim-ddb70d33f814619333e475975c6dbe6e39e5d035.tar.gz |
Add processSingleTest, remove file arg from processCategory
-rw-r--r-- | tests/testament/categories.nim | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index 3ed2f2196..5e18587f0 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -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) |