node/test/pseudo-tty/readline-dumb-tty.js
Antoine du Hamel aa8a2441cb
test: add trailing commas in test/pseudo-tty
PR-URL: https://github.com/nodejs/node/pull/46371
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-01-29 19:14:30 +01:00

22 lines
483 B
JavaScript

'use strict';
require('../common');
process.env.TERM = 'dumb';
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
rl.write('text');
rl.write(null, { ctrl: true, name: 'u' });
rl.write(null, { name: 'return' });
rl.write('text');
rl.write(null, { name: 'backspace' });
rl.write(null, { name: 'escape' });
rl.write(null, { name: 'enter' });
rl.write('text');
rl.write(null, { ctrl: true, name: 'c' });