Files
orca/tests/e2e/terminal-marker-echo-command.ts
Jinjing b8d6b21dfa test(e2e): add golden E2E tests for workspace session management (#14304)
* test(e2e): add golden E2E tests for workspace session management

- Restore exact file and terminal state after quit/relaunch
- Verify terminal file link activation and external edit detection
- Test worktree creation and switching with isolated terminals
- Isolate test repo paths between concurrent CI runs with UUIDs

* Add platform-aware marker echo command utility

- Create splitMarkerEchoCommand() to generate shell commands that
  safely echo test markers across Windows and Unix platforms
- Split markers into prefix/suffix fragments so output assertions
  prove execution, not just shell echo-back
- Consolidate SORTABLE_TAB export and improve tab bar locator logic
- Refactor terminal link helpers to extract client point calculation
2026-08-13 10:26:20 -07:00

9 lines
489 B
TypeScript

// Why: the shell echoes the command line back into the buffer, so a marker written as one literal
// would satisfy an output assertion even if the command never ran. Splitting it into two fragments
// that only rejoin in the command's output makes the assertion proof of execution.
export function splitMarkerEchoCommand(prefix: string, suffix: string): string {
return process.platform === 'win32'
? `Write-Output ('${prefix}' + '${suffix}')`
: `echo "${prefix}""${suffix}"`
}