fix buffer tests

This commit is contained in:
Jörg Breitbart
2018-10-31 15:11:18 +01:00
parent 1c111d3e60
commit 8ffcd65cff
3 changed files with 9 additions and 10 deletions
+3 -3
View File
@@ -509,10 +509,10 @@ describe('Buffer', () => {
// --> fixable after resolving #1685
terminal.writeSync(input);
// TODO: reenable after fix
// const s = terminal.buffer.contents(true).toArray()[0];
// assert.equal(input, s);
const s = terminal.buffer.iterator(true).next().content;
assert.equal(input, s);
for (let i = 10; i < input.length; ++i) {
const bufferIndex = terminal.buffer.stringIndexToBufferIndex(0, i + 1); // TODO: remove +1 after fix
const bufferIndex = terminal.buffer.stringIndexToBufferIndex(0, i); // TODO: remove +1 after fix
const j = (i - 0) << 1;
assert.deepEqual([(j / terminal.cols) | 0, j % terminal.cols], bufferIndex);
}