2018-08-16 02:14:22 +02:00
|
|
|
// Flags: --expose-internals --no-warnings
|
2015-05-19 13:00:06 +02:00
|
|
|
'use strict';
|
2016-07-08 14:24:53 +02:00
|
|
|
require('../common');
|
2011-09-20 22:38:07 +02:00
|
|
|
|
2018-08-16 02:14:22 +02:00
|
|
|
const { internalBinding } = require('internal/test/binding');
|
2018-08-23 16:20:12 +02:00
|
|
|
const { TTY } = internalBinding('tty_wrap');
|
2018-08-16 02:14:22 +02:00
|
|
|
const { WriteWrap } = internalBinding('stream_wrap');
|
2011-09-20 22:38:07 +02:00
|
|
|
|
2016-07-08 14:24:53 +02:00
|
|
|
const handle = new TTY(1);
|
|
|
|
const req = new WriteWrap();
|
2011-09-20 22:38:07 +02:00
|
|
|
|
2016-07-08 14:24:53 +02:00
|
|
|
handle.writeBuffer(req, Buffer.from('hello world 1\n'));
|
|
|
|
handle.writeBuffer(req, Buffer.from('hello world 2\n'));
|