diff options
author | Jonathan Darling <jmdarling@me.com> | 2016-12-01 11:49:50 -0600 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-12-05 14:23:15 -0800 |
commit | 3ae09001426bbb018bdeae39747225256e370f3d (patch) | |
tree | 924af006c1fb8f998f352ca3e9625e6a57f621de /test/pseudo-tty | |
parent | 1d766b8f5ddbd0a573551bef2eeeb844a20361dc (diff) | |
download | node-new-3ae09001426bbb018bdeae39747225256e370f3d.tar.gz |
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 <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/pseudo-tty')
-rw-r--r-- | test/pseudo-tty/stdin-setrawmode.js | 9 |
1 files changed, 9 insertions, 0 deletions
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); |