summary refs log tree commit diff stats
path: root/tests/osproc/tstdin.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/osproc/tstdin.nim')
-rw-r--r--tests/osproc/tstdin.nim11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/osproc/tstdin.nim b/tests/osproc/tstdin.nim
index d94c34192..9b49ed786 100644
--- a/tests/osproc/tstdin.nim
+++ b/tests/osproc/tstdin.nim
@@ -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