0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/test/pseudo-tty/test-tty-wrap.js

14 lines
413 B
JavaScript
Raw Normal View History

// Flags: --expose-internals --no-warnings
'use strict';
require('../common');
2011-09-20 22:38:07 +02:00
const { internalBinding } = require('internal/test/binding');
const { TTY } = internalBinding('tty_wrap');
const { WriteWrap } = internalBinding('stream_wrap');
2011-09-20 22:38:07 +02:00
const handle = new TTY(1);
const req = new WriteWrap();
2011-09-20 22:38:07 +02:00
handle.writeBuffer(req, Buffer.from('hello world 1\n'));
handle.writeBuffer(req, Buffer.from('hello world 2\n'));