Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-regress-GH-5927.js « parallel « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7f55356a15e027184ad073f08620c29a83f5ab7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'use strict';
require('../common');
const assert = require('assert');
const readline = require('readline');

const rl = readline.createInterface(process.stdin, process.stdout);
rl.resume();

let hasPaused = false;

const origPause = rl.pause;
rl.pause = function() {
  hasPaused = true;
  origPause.apply(this, arguments);
};

const origSetRawMode = rl._setRawMode;
rl._setRawMode = function(mode) {
  assert.ok(hasPaused);
  origSetRawMode.apply(this, arguments);
};

rl.close();