0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/test/pseudo-tty/test-tty-wrap.js
Jeremiah Senkpiel aab306679e test: fix old tty tests
test-tty-wrap hasn’t worked since StreamBase was introduced, I think.
test-tty-stdout-end also happens to works with PipeWrap-s.

Refs: https://github.com/nodejs/node/pull/7360
PR-URL: https://github.com/nodejs/node/pull/7613
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-07-11 15:22:09 +02:00

12 lines
314 B
JavaScript

'use strict';
require('../common');
const TTY = process.binding('tty_wrap').TTY;
const WriteWrap = process.binding('stream_wrap').WriteWrap;
const handle = new TTY(1);
const req = new WriteWrap();
handle.writeBuffer(req, Buffer.from('hello world 1\n'));
handle.writeBuffer(req, Buffer.from('hello world 2\n'));