aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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'")