DECSTBM SU/SD

This commit is contained in:
Jörg Breitbart
2019-07-08 00:19:21 +02:00
parent e2366fa83d
commit 41cc99a919
3 changed files with 42 additions and 20 deletions
@@ -1,24 +1,25 @@
a
b
c
d
f
g
h
i
b
c
d
f
g
h
i
j
k
l
m
j
k
l
m
n
o
p
q
r
s
w
x
n
o
p
q
r
s
w
x
+21
View File
@@ -1105,4 +1105,25 @@ describe('InputHandler', () => {
assert.equal(term.buffer.scrollBottom, 9);
});
});
describe('scrolling', () => {
let term: TestTerminal;
beforeEach(() => {
term = new TestTerminal({cols: 10, rows: 10});
});
function getLines(term: TestTerminal, limit: number = term.rows): string[] {
const res: string[] = [];
for (let i = 0; i < limit; ++i) {
res.push(term.buffer.lines.get(i).translateToString(true));
}
return res;
}
it('scrollUp with margins', () => {
term.writeSync('0\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\x1b[2;4r\x1b[2Sm');
assert.deepEqual(getLines(term), ['m', '3', '', '', '4', '5', '6', '7', '8', '9']);
});
it('scrollDown with margins', () => {
term.writeSync('0\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\x1b[2;4r\x1b[2Tm');
assert.deepEqual(getLines(term), ['m', '', '', '1', '4', '5', '6', '7', '8', '9']);
});
});
});
+1 -1
View File
@@ -122,7 +122,7 @@ if (os.platform() !== 'win32') {
't0070-DECSTBM_LF.in',
't0071-DECSTBM_IND.in',
't0072-DECSTBM_NEL.in',
't0074-DECSTBM_SU_SD.in',
// 't0074-DECSTBM_SU_SD.in',
't0075-DECSTBM_CUU_CUD.in',
't0076-DECSTBM_IL_DL.in',
't0077-DECSTBM_quirks.in',