mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 14:23:45 +00:00
Clean up tests/osproc
This commit is contained in:
@@ -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
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user