summary refs log tree commit diff stats
path: root/tests/osproc
diff options
context:
space:
mode:
authordef <dennis@felsin9.de>2015-02-04 22:15:30 +0100
committerdef <dennis@felsin9.de>2015-02-04 22:15:30 +0100
commit1c4153790bbdad0dbd6144e43cf92fc07d08bf5f (patch)
treefb9ac15a61aa883af0a66535e98b0de7d921cdd1 /tests/osproc
parentf18368bd3b688a6fc1bc4ff729577be6bd9a9d3e (diff)
downloadNim-1c4153790bbdad0dbd6144e43cf92fc07d08bf5f.tar.gz
Clean up tests/osproc
Diffstat (limited to 'tests/osproc')
-rw-r--r--tests/osproc/tstdin.nim9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/osproc/tstdin.nim b/tests/osproc/tstdin.nim
index 2ea939992..b491c2500 100644
--- a/tests/osproc/tstdin.nim
+++ b/tests/osproc/tstdin.nim
@@ -4,13 +4,16 @@ discard """
 """
 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.flush()
 while true:
   let line = p.outputStream.readLine()
   if line != "":
     echo line
   else:
-    break
\ No newline at end of file
+    break