From ec7df6c0a4cc67cc72b43ce07e4d43d805483625 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 0000000000..015c769a9b --- /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);