diff options
author | Dmitry Atamanov <data-man@users.noreply.github.com> | 2018-04-06 11:09:05 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-06 10:09:05 +0200 |
commit | cf6d41b51d707452d3f2d193d3cf7d9767a15fce (patch) | |
tree | 36cd64a8f384fe4fa1c3096828be6dd6c0f847b2 /tests/osproc | |
parent | 4d6456d029964153cc9cb99a06ebbe13ffb15ef5 (diff) | |
download | Nim-cf6d41b51d707452d3f2d193d3cf7d9767a15fce.tar.gz |
Fixes #5281 (#7489)
Diffstat (limited to 'tests/osproc')
-rw-r--r-- | tests/osproc/tstdin.nim | 11 |
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 |