From 3ae09001426bbb018bdeae39747225256e370f3d Mon Sep 17 00:00:00 2001 From: Jonathan Darling Date: Thu, 1 Dec 2016 11:49:50 -0600 Subject: [PATCH] test: add test for process.stdin.setRawMode() adds a basic test for process.stdin.setRawMode to ensure that the isRaw property is properly changed PR-URL: https://github.com/nodejs/node/pull/10037 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- test/pseudo-tty/stdin-setrawmode.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/pseudo-tty/stdin-setrawmode.js diff --git a/test/pseudo-tty/stdin-setrawmode.js b/test/pseudo-tty/stdin-setrawmode.js new file mode 100644 index 00000000000000..015c769a9b6144 --- /dev/null +++ b/test/pseudo-tty/stdin-setrawmode.js @@ -0,0 +1,9 @@ +'use strict'; +require('../common'); +const assert = require('assert'); + +process.stdin.setRawMode(true); +assert.strictEqual(process.stdin.isRaw, true); + +process.stdin.setRawMode(false); +assert.strictEqual(process.stdin.isRaw, false);