mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
PR-URL: https://github.com/nodejs/node/pull/59964 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
22 lines
590 B
JavaScript
22 lines
590 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { startNewREPLServer } = require('../common/repl');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const { input, output } = startNewREPLServer(
|
|
{ useColors: true }, { disableDomainErrorAssert: true }
|
|
);
|
|
|
|
output.accumulator = '';
|
|
|
|
for (const char of ['\\n', '\\v', '\\r']) {
|
|
input.emit('data', `"${char}"()`);
|
|
// Make sure the output is on a single line
|
|
assert.strictEqual(output.accumulator, `"${char}"()\n\x1B[90mTypeError: "\x1B[39m\x1B[7G\x1B[1A`);
|
|
input.run(['']);
|
|
output.accumulator = '';
|
|
}
|