diff --git a/test/api/InputHandler.api.ts b/test/api/InputHandler.api.ts index 9ca0c943..05b16010 100644 --- a/test/api/InputHandler.api.ts +++ b/test/api/InputHandler.api.ts @@ -196,6 +196,36 @@ describe('InputHandler Integration Tests', function(): void { assert.deepEqual(await getLinesAsArray(5), [' 4', ' 5', 'abc', 'def', 'ghi']); }); + it('IL: Insert Ps Line(s) (default = 1) - CSI Ps L', async function(): Promise { + await page.evaluate(` + // Default + window.term.write('foo\x1b[La') + // Explicit + window.term.write('\x1b[2Lb') + `); + assert.deepEqual(await getLinesAsArray(4), ['b', '', 'a', 'foo']); + }); + + it('DL: Delete Ps Line(s) (default = 1) - CSI Ps M', async function(): Promise { + await page.evaluate(` + // Default + window.term.write('a\\nb\x1b[1F\x1b[M') + // Explicit + window.term.write('\x1b[1Ed\\ne\\nf\x1b[2F\x1b[2M') + `); + assert.deepEqual(await getLinesAsArray(5), [' b', ' f', '', '', '']); + }); + + it('DCH: Delete Ps Character(s) (default = 1) - CSI Ps P', async function(): Promise { + await page.evaluate(` + // Default + window.term.write('abc\x1b[1;1H\x1b[P') + // Explicit + window.term.write('\\n\\rdef\x1b[2;1H\x1b[2P') + `); + assert.deepEqual(await getLinesAsArray(2), ['bc', 'f']); + }); + describe('DSR: Device Status Report', () => { it('Status Report - CSI 5 n', async function(): Promise { await page.evaluate(`