Support serializing tabs

This commit is contained in:
Daniel Imms
2019-12-07 10:24:22 -08:00
parent 903d75e6d3
commit ca12cf5802
2 changed files with 19 additions and 2 deletions
@@ -260,10 +260,16 @@ describe('SerializeAddon', () => {
it('serialize tabs correctly', async () => {
const lines = [
'a\tb',
'foo\tbar\tbaz'
'aa\tc',
'aaa\td'
];
const expected = [
'a\x1b[7Cb',
'aa\x1b[6Cc',
'aaa\x1b[5Cd'
];
await writeSync(page, lines.join('\\r\\n'));
assert.equal(await page.evaluate(`serializeAddon.serialize();`), lines.join('\r\n'));
assert.equal(await page.evaluate(`serializeAddon.serialize();`), expected.join('\r\n'));
});
});