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