aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2018-08-06 11:37:02 -0500
committerGanesh Viswanathan <dev@genotrance.com>2018-08-06 11:37:02 -0500
commit0406d833841a77d4ddddad358864b838bb3e3a95 (patch)
tree96ea797bafdf82d0c4e4120da046e36ea8f81929
parent32debc5534bc4a82e5f944adb2e4b42043bf5fab (diff)
parentdb0363505e13feaea27a7077452f3e20e6935346 (diff)
downloadnimgen-features-1.tar.gz
nimgen-features-1.zip
Merge branch 'master' of https://github.com/genotrance/nimgen into features-1features-1
-rw-r--r--tests/rununittests.nim4
-rw-r--r--tests/unittests/testfileops.nim2
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/rununittests.nim b/tests/rununittests.nim
index a92ff0a..865f77d 100644
--- a/tests/rununittests.nim
+++ b/tests/rununittests.nim
@@ -1,8 +1,10 @@
import os, osproc, strutils
proc main() =
+ var failures = 0
for file in walkFiles(currentSourcePath().splitPath().head / "unittests/*.nim"):
let (path, fname, ext) = file.splitFile()
if fname.startswith("test"):
- discard execCmd "nim c -r " & file
+ failures += execCmd "nim c -r " & file
+ quit(failures)
main()
diff --git a/tests/unittests/testfileops.nim b/tests/unittests/testfileops.nim
index 2fff387..076c586 100644
--- a/tests/unittests/testfileops.nim
+++ b/tests/unittests/testfileops.nim
@@ -120,7 +120,7 @@ suite "test file ops":
test "pipe command into file":
when defined(windows):
- pipe(testfilename, "(ECHO foo)>>$file")
+ pipe(testfilename, "ECHO foo")
testfilename.checkFile("foo")
else:
pipe(testfilename, "cat $file | grep 'this is text'")