Add regression test

This commit is contained in:
Daniel Imms
2023-09-09 05:59:24 -07:00
parent 608a5e2329
commit 4e69307074
+13 -2
View File
@@ -144,7 +144,7 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 8, 1), [22, 23, 24, 255]);
});
test('foreground 0-15 inivisible', async () => {
test('foreground 0-15 invisible', async () => {
const theme: ITheme = {
black: '#010203',
red: '#040506',
@@ -167,7 +167,7 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 8, 1), [0, 0, 0, 255]);
});
test('background 0-15 inivisible', async () => {
test('background 0-15 invisible', async () => {
const theme: ITheme = {
black: '#010203',
red: '#040506',
@@ -1070,6 +1070,17 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 2, 1), [0, 0, 255, 255]); // inverse background of ' ' should be decoration bg override
});
});
test.describe('regression tests', () => {
test('#4758: multiple invisible text characters without SGR change should not be rendered', async () => {
// Regression test: #4758 when multiple invisible characters are used
await ctx.value.proxy.writeln(`\x1b[8m■■`);
// Full refresh as the before result is the same as after
await ctx.value.proxy.refresh(0, await ctx.value.proxy.rows - 1);
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 1, 1), [0, 0, 0, 255]);
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 2, 1), [0, 0, 0, 255]);
});
});
}
/**