node/test/pseudo-tty/test-tty-wrap.js
Jeremiah Senkpiel 9797969ad4 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-15 08:09:42 -05:00

11 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'));