mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
df073cdda4
PR-URL: https://github.com/nodejs/node/pull/22477 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
14 lines
413 B
JavaScript
14 lines
413 B
JavaScript
// Flags: --expose-internals --no-warnings
|
|
'use strict';
|
|
require('../common');
|
|
|
|
const { internalBinding } = require('internal/test/binding');
|
|
const { TTY } = internalBinding('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'));
|