Files
orca/tests/e2e/terminal-probe-input-sequence.ts
slashdevcorpseandBrennan Benson 803a442868 test(e2e): harden terminal restart regressions on Windows (#9064)
* test(e2e): harden Windows terminal restart regressions

* test(e2e): cover renderer replacement rejection

* test(e2e): tolerate ESRCH when force-killing the daemon on POSIX

* fix(ci): preserve Windows restart test selection

---------

Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
2026-07-17 17:18:36 -07:00

15 lines
635 B
TypeScript

export function buildFreshShellProbeInputSequence(command: string): readonly string[] {
// Why: Windows ConPTY can echo a startup Ctrl+C as literal "^C", which
// corrupts the following PowerShell command before the shell is ready.
return [command]
}
export function buildSettledShellProbeInputSequence(
command: string,
platform: NodeJS.Platform = process.platform
): readonly string[] {
// Why: Ctrl+U is a POSIX line-editor binding. A settled native Windows shell
// needs a separate Ctrl+C so ConPTY cannot join it to the command as input.
return platform === 'win32' ? ['\x03', command] : ['\x03\x15', command]
}