mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-22 07:15:22 +00:00
committed by
Andreas Rumpf
parent
4d6456d029
commit
cf6d41b51d
@@ -11,9 +11,8 @@ 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
|
||||
|
||||
var line = ""
|
||||
|
||||
while p.outputStream.readLine(line.TaintedString):
|
||||
echo line
|
||||
|
||||
Reference in New Issue
Block a user