Enable other tests and fix viewport check
This commit is contained in:
@@ -56,7 +56,7 @@ function formatError(in_, out_, expected) {
|
|||||||
function terminalToString(term) {
|
function terminalToString(term) {
|
||||||
var result = '';
|
var result = '';
|
||||||
var line_s = '';
|
var line_s = '';
|
||||||
for (var line=0; line<term.rows; ++line) {
|
for (var line = term.ybase; line < term.ybase + term.rows; line++) {
|
||||||
line_s = '';
|
line_s = '';
|
||||||
for (var cell=0; cell<term.cols; ++cell) {
|
for (var cell=0; cell<term.cols; ++cell) {
|
||||||
line_s += term.lines.get(line)[cell][1];
|
line_s += term.lines.get(line)[cell][1];
|
||||||
@@ -82,10 +82,12 @@ describe('xterm output comparison', function() {
|
|||||||
Error.stackTraceLimit = 0;
|
Error.stackTraceLimit = 0;
|
||||||
var files = glob.sync('**/escape_sequence_files/*.in');
|
var files = glob.sync('**/escape_sequence_files/*.in');
|
||||||
// only successful tests for now
|
// only successful tests for now
|
||||||
var successful = [0, 2, 6, 12, 13, 18, 20, 22, 27, 28];
|
var successful = [0, 2, 6, 12, 13, 18, 20, 22, 27, 28, 50];
|
||||||
for (var a in successful) {
|
for (var i = 0; i < files.length; i++) {
|
||||||
var i = successful[a];
|
// if (i !== 1) continue;
|
||||||
(function(filename){
|
//for (var a in successful) {
|
||||||
|
// var i = successful[a];
|
||||||
|
(function(filename) {
|
||||||
it(filename.split('/').slice(-1)[0], function () {
|
it(filename.split('/').slice(-1)[0], function () {
|
||||||
pty_reset();
|
pty_reset();
|
||||||
var in_file = fs.readFileSync(filename, 'utf8');
|
var in_file = fs.readFileSync(filename, 'utf8');
|
||||||
@@ -102,8 +104,8 @@ describe('xterm output comparison', function() {
|
|||||||
var expected = fs.readFileSync(filename.split('.')[0] + '.text', 'utf8');
|
var expected = fs.readFileSync(filename.split('.')[0] + '.text', 'utf8');
|
||||||
if (from_emulator != expected) {
|
if (from_emulator != expected) {
|
||||||
// uncomment to get noisy output
|
// uncomment to get noisy output
|
||||||
//throw new Error(formatError(in_file, from_emulator, expected));
|
throw new Error(formatError(in_file, from_emulator, expected));
|
||||||
throw new Error('mismatch');
|
// throw new Error('mismatch');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})(files[i]);
|
})(files[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user