Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
return result;
}
// Skip tests on Windows since pty.open isn't supported
if (os.platform() !== 'win32') {
const CONSOLE_LOG = console.log;
// expect files need terminal at 80x25!
const COLS = 80;
const ROWS = 25;
/** some helpers for pty interaction */
// we need a pty in between to get the termios decorations
// for the basic test cases a raw pty device is enough
primitivePty = pty.native.open(COLS, ROWS);
/** tests */
describe('xterm output comparison', () => {
let xterm;
beforeEach(() => {
xterm = new Terminal({ cols: COLS, rows: ROWS });
xterm.refresh = () => {};
xterm.viewport = {
syncScrollArea: () => {}
};
});
// omit stack trace for escape sequence files
Error.stackTraceLimit = 0;
const files = glob.sync('**/escape_sequence_files/*.in', { cwd: path.join(__dirname, '..')});
for (var line = term.buffer.ybase; line < term.buffer.ybase + term.rows; line++) {
lineText = '';
for (var cell = 0; cell < term.cols; ++cell) {
lineText += term.buffer.lines.get(line).loadCell(cell, new BufferLine_1.CellData()).getChars() || BufferLine_1.WHITESPACE_CELL_CHAR;
}
lineText = lineText.replace(/\s+$/, '');
result += lineText;
result += '\n';
}
return result;
}
if (os.platform() !== 'win32') {
var consoleLog_1 = console.log;
var cols_1 = 80;
var rows_1 = 25;
primitivePty = pty.native.open(cols_1, rows_1);
describe('xterm output comparison', function () {
this.timeout(10000);
var xterm;
beforeEach(function () {
xterm = new TestTerminal({ cols: cols_1, rows: rows_1 });
xterm.refresh = function () { };
xterm.viewport = {
syncScrollArea: function () { }
};
});
Error.stackTraceLimit = 0;
var files = glob.sync('**/escape_sequence_files/*.in', { cwd: path.join(__dirname, '..') });
var skip = [
10, 16, 17, 19, 32, 33, 34, 35, 36, 39,
40, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 54, 55, 56, 57, 58, 59, 60, 61,