diff options
Diffstat (limited to 'test/bun.js/stdin-repro.js')
-rw-r--r-- | test/bun.js/stdin-repro.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/bun.js/stdin-repro.js b/test/bun.js/stdin-repro.js index 5f945be7c..02840d00b 100644 --- a/test/bun.js/stdin-repro.js +++ b/test/bun.js/stdin-repro.js @@ -1,7 +1,10 @@ -var count = 5; +var stdout = Bun.stdout.writer(); +console.error("Started"); +var count = 0; for await (let chunk of Bun.stdin.stream()) { const str = new Buffer(chunk).toString(); - console.error("how many?", count, chunk.byteLength); - count -= str.split("\n").length; - console.log(str); + stdout.write(str); + stdout.flush(); + count++; } +console.error("Finished with", count); |