Merge branch 'master' of https://github.com/genotrance/nimgen into features-1

This commit is contained in:
Ganesh Viswanathan 2018-08-06 11:37:02 -05:00
commit 0406d83384
2 changed files with 4 additions and 2 deletions

View file

@ -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()

View file

@ -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'")