Files
orca/tests/e2e/terminal-probe-input-sequence.unit.test.ts
mirror 34fa2cd5ca
Skill update round trip / roundtrip (false, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, latest) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
source snapshot 2026-09-02
2026-09-02 02:03:16 +08:00

27 lines
1.1 KiB
TypeScript

import { describe, expect, it } from 'vitest'
import {
buildFreshShellProbeInputSequence,
buildSettledShellProbeInputSequence
} from './terminal-probe-input-sequence'
const command = "& 'C:\\node\\node.exe' '-e' 'console.log(1)'\r"
describe('buildFreshShellProbeInputSequence', () => {
it('does not prefix fresh shell probes with interrupt or line-kill bytes', () => {
expect(buildFreshShellProbeInputSequence(command)).toEqual([command])
expect(buildFreshShellProbeInputSequence(command).join('')).not.toContain('\x03')
expect(buildFreshShellProbeInputSequence(command).join('')).not.toContain('\x15')
})
})
describe('buildSettledShellProbeInputSequence', () => {
it('resets PowerShell without sending the POSIX Ctrl+U binding', () => {
expect(buildSettledShellProbeInputSequence(command, 'win32')).toEqual(['\x03', command])
expect(buildSettledShellProbeInputSequence(command, 'win32').join('')).not.toContain('\x15')
})
it.each(['linux', 'darwin'] as const)('preserves the POSIX reset on %s', (platform) => {
expect(buildSettledShellProbeInputSequence(command, platform)).toEqual(['\x03\x15', command])
})
})