Ensure terminal data is segmented by C and D sequences

The tests failed because on mac the 633;C and 633;D events both appear in the
same event. The change ensures we match globally on the regex and cleans up
handling of multiple events. This went from failing consistently to passing
consistently on my mac.

Fixes #241592
This commit is contained in:
Daniel Imms
2025-02-23 07:35:37 -08:00
parent 199a1b6c95
commit 55feb94b29
2 changed files with 24 additions and 21 deletions

View File

@@ -142,7 +142,7 @@ import { assertNoRpc } from '../utils';
await closeTerminalAsync(terminal);
});
test.skip('TerminalShellExecution.read iterables should be available between the start and end execution events', async () => {
test('TerminalShellExecution.read iterables should be available between the start and end execution events', async () => {
const { terminal, shellIntegration } = await createTerminalAndWaitForShellIntegration();
const events: string[] = [];
disposables.push(window.onDidStartTerminalShellExecution(() => events.push('start')));
@@ -164,7 +164,7 @@ import { assertNoRpc } from '../utils';
await closeTerminalAsync(terminal);
});
test.skip('TerminalShellExecution.read events should fire with contents of command', async () => {
test('TerminalShellExecution.read events should fire with contents of command', async () => {
const { terminal, shellIntegration } = await createTerminalAndWaitForShellIntegration();
const events: string[] = [];
@@ -179,7 +179,7 @@ import { assertNoRpc } from '../utils';
await closeTerminalAsync(terminal);
});
test.skip('TerminalShellExecution.read events should give separate iterables per call', async () => {
test('TerminalShellExecution.read events should give separate iterables per call', async () => {
const { terminal, shellIntegration } = await createTerminalAndWaitForShellIntegration();
const { execution, endEvent } = executeCommandAsync(shellIntegration, 'echo hello');