node/test/parallel/test-stdin-pause-resume.js

17 lines
429 B
JavaScript
Raw Normal View History

2012-01-18 02:43:34 +08:00
console.error('before opening stdin');
process.stdin.resume();
2012-01-18 02:43:34 +08:00
console.error('stdin opened');
setTimeout(function() {
2012-01-18 02:43:34 +08:00
console.error('pausing stdin');
process.stdin.pause();
setTimeout(function() {
2012-01-18 02:43:34 +08:00
console.error('opening again');
process.stdin.resume();
setTimeout(function() {
2012-01-18 02:43:34 +08:00
console.error('pausing again');
process.stdin.pause();
2012-01-18 02:43:34 +08:00
console.error('should exit now');
}, 1);
}, 1);
}, 1);