Right trim expected output, we don't care for now

This fixes 2 tests
This commit is contained in:
Daniel Imms
2017-01-20 21:39:27 -08:00
parent d5f0fff523
commit adaf604ce0
+6 -1
View File
@@ -102,7 +102,12 @@ describe('xterm output comparison', function() {
var from_emulator = terminalToString(xterm);
console.log = CONSOLE_LOG;
var expected = fs.readFileSync(filename.split('.')[0] + '.text', 'utf8');
if (from_emulator != expected) {
// Some of the tests have whitespace on the right of lines, we trim all the linex
// from xterm.js so ignore this for now at least.
var expectedRightTrimmed = expected.split('\n').map(function (l) {
return l.replace(/\s+$/, '');
}).join('\n');
if (from_emulator != expectedRightTrimmed) {
// uncomment to get noisy output
throw new Error(formatError(in_file, from_emulator, expected));
// throw new Error('mismatch');