From c56f3edb103b03ee9b8aaa0b90a36b61278c2aea Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 24 Sep 2018 12:08:46 +0200 Subject: [PATCH] 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 --- test/pseudo-tty/test-stdin-write.js | 3 +++ test/pseudo-tty/test-stdin-write.out | 1 + 2 files changed, 4 insertions(+) create mode 100644 test/pseudo-tty/test-stdin-write.js create mode 100644 test/pseudo-tty/test-stdin-write.out diff --git a/test/pseudo-tty/test-stdin-write.js b/test/pseudo-tty/test-stdin-write.js new file mode 100644 index 00000000000000..39091f20bbb745 --- /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 00000000000000..323fae03f4606e --- /dev/null +++ b/test/pseudo-tty/test-stdin-write.out @@ -0,0 +1 @@ +foobar