aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/stdin-repro.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/bun.js/stdin-repro.js')
-rw-r--r--test/bun.js/stdin-repro.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/bun.js/stdin-repro.js b/test/bun.js/stdin-repro.js
index 05daf0637..5f945be7c 100644
--- a/test/bun.js/stdin-repro.js
+++ b/test/bun.js/stdin-repro.js
@@ -1,5 +1,7 @@
-while (true) {
- for await (let chunk of Bun.stdin.stream()) {
- console.log(new Buffer(chunk).toString());
- }
+var count = 5;
+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);
}