diff options
author | 2022-11-25 22:53:21 -0800 | |
---|---|---|
committer | 2022-11-25 22:53:21 -0800 | |
commit | 397cb6600b831a1ab5daeac07a5e2d8f113f7c71 (patch) | |
tree | 29e0d43ac03f75c0ddf1ac98a2fdf764c053c902 /test/bun.js/stdin-repro.js | |
parent | bef469ea5590bba90c8d10b5bc4610dc4ebdff94 (diff) | |
download | bun-397cb6600b831a1ab5daeac07a5e2d8f113f7c71.tar.gz bun-397cb6600b831a1ab5daeac07a5e2d8f113f7c71.tar.zst bun-397cb6600b831a1ab5daeac07a5e2d8f113f7c71.zip |
Update test
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); |