Clean up tests/osproc

This commit is contained in:
def 2015-02-04 22:15:30 +01:00
commit 1c4153790b

View file

@ -4,10 +4,13 @@ discard """
""" """
import osproc, os, streams import osproc, os, streams
doAssert fileExists(getCurrentDir() / "tests" / "osproc" / "ta.exe") const filename = when defined(Windows): "ta.exe" else: "ta"
var p = startProcess("ta.exe", getCurrentDir() / "tests" / "osproc") doAssert fileExists(getCurrentDir() / "tests" / "osproc" / filename)
var p = startProcess(filename, getCurrentDir() / "tests" / "osproc")
p.inputStream.write("5\n") p.inputStream.write("5\n")
p.inputStream.flush()
while true: while true:
let line = p.outputStream.readLine() let line = p.outputStream.readLine()
if line != "": if line != "":