mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 09:37:33 +00:00
test: detect quarantined input forwarded with provenance (#29715)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -751,12 +751,12 @@ export function registerPtyConnectionTerminalInputGatingTests(): void {
|
||||
// The surviving tail of `echo hi; rm -rf x`: reaching the fresh shell would
|
||||
// let the user's own Enter run `rm -rf x` (#10065 follow-up).
|
||||
sendTerminalInputThroughPane(pane, 'cho hi; rm -rf x')
|
||||
expect(transport.sendInput).not.toHaveBeenCalledWith('cho hi; rm -rf x')
|
||||
expect(transport.sendInput.mock.calls.map(([data]) => data)).not.toContain('cho hi; rm -rf x')
|
||||
// A program that queries during reattach hangs if its reply is dropped.
|
||||
sendTerminalInputThroughPane(pane, '\x1b[3;1R')
|
||||
expect(transport.sendInputImmediate).toHaveBeenCalledWith('\x1b[3;1R')
|
||||
sendTerminalInputThroughPane(pane, '\r')
|
||||
expect(transport.sendInput).not.toHaveBeenCalledWith('\r')
|
||||
expect(transport.sendInput.mock.calls.map(([data]) => data)).not.toContain('\r')
|
||||
// The terminator disarmed it, so the next real command reaches the shell.
|
||||
sendTerminalInputThroughPane(pane, 'ls\r')
|
||||
expect(transport.sendInput).toHaveBeenCalledWith('ls\r', 'query-reply')
|
||||
|
||||
Reference in New Issue
Block a user