summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-09-24 12:08:46 +0200
committerBeth Griggs <Bethany.Griggs@uk.ibm.com>2019-03-19 22:55:34 +0000
commitc56f3edb103b03ee9b8aaa0b90a36b61278c2aea (patch)
tree0c68842a07d79ff4b0c9adcd2164e664a044e9c9 /test
parentea5628e77ae12bdb34e4c1514261ea27c45f6562 (diff)
downloadnode-new-c56f3edb103b03ee9b8aaa0b90a36b61278c2aea.tar.gz
test: add stdin writable regression test
Make sure that `process.stdin.write()`, and in particular ending the stream, works. Backport-PR-URL: https://github.com/nodejs/node/pull/25351 PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/pseudo-tty/test-stdin-write.js3
-rw-r--r--test/pseudo-tty/test-stdin-write.out1
2 files changed, 4 insertions, 0 deletions
diff --git a/test/pseudo-tty/test-stdin-write.js b/test/pseudo-tty/test-stdin-write.js
new file mode 100644
index 0000000000..39091f20bb
--- /dev/null
+++ b/test/pseudo-tty/test-stdin-write.js
@@ -0,0 +1,3 @@
+'use strict';
+require('../common');
+process.stdin.end('foobar\n');
diff --git a/test/pseudo-tty/test-stdin-write.out b/test/pseudo-tty/test-stdin-write.out
new file mode 100644
index 0000000000..323fae03f4
--- /dev/null
+++ b/test/pseudo-tty/test-stdin-write.out
@@ -0,0 +1 @@
+foobar