diff options
| author | Joey Yakimowich-Payne <jyapayne@gmail.com> | 2018-08-03 13:02:56 +0900 |
|---|---|---|
| committer | Joey Yakimowich-Payne <jyapayne@gmail.com> | 2018-08-03 13:02:56 +0900 |
| commit | 87e08bfb666789942462739e90afa3e4bd23a1de (patch) | |
| tree | 7a9440a6466aeacb0e770af084a98445f2678293 | |
| parent | 2c3cc71540f94783a98f34a82afc5c40bf320dd3 (diff) | |
| download | nimgen-87e08bfb666789942462739e90afa3e4bd23a1de.tar.gz nimgen-87e08bfb666789942462739e90afa3e4bd23a1de.zip | |
Fix unit test for Windows and quit with failure code
| -rw-r--r-- | tests/rununittests.nim | 4 | ||||
| -rw-r--r-- | tests/unittests/testfileops.nim | 2 |
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..5d2119f 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 > $file") testfilename.checkFile("foo") else: pipe(testfilename, "cat $file | grep 'this is text'") |
