summaryrefslogtreecommitdiff
path: root/test/pseudo-tty/test-tty-wrap.js
blob: cb961d04033b6b1fb88b56a79f051cff38b70e03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Flags: --expose-internals --no-warnings
'use strict';
require('../common');

const { internalBinding } = require('internal/test/binding');
const { TTY } = process.binding('tty_wrap');
const { WriteWrap } = internalBinding('stream_wrap');

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