mirror of
https://github.com/stablyai/orca.git
synced 2026-10-19 00:03:20 +00:00
The longer-hyphen recovery path (#5222) reconstructed runs by writing a value that differed from the native field text. After #7933 stores raw field text and normalizes only on send/PTY, that recovery is unreachable and any write-back would reintroduce dictation kill. Map each smart dash to exactly "--" with a single-arg normalizer.
15 lines
592 B
TypeScript
15 lines
592 B
TypeScript
import { describe, expect, it } from 'vitest'
|
||
|
||
import { normalizeTerminalTextInput } from './terminal-text-input-normalization'
|
||
|
||
describe('normalizeTerminalTextInput', () => {
|
||
it('converts iOS smart dash replacements back to terminal hyphens', () => {
|
||
expect(normalizeTerminalTextInput('git checkout – file')).toBe('git checkout -- file')
|
||
expect(normalizeTerminalTextInput('git checkout — file')).toBe('git checkout -- file')
|
||
})
|
||
|
||
it('keeps ASCII hyphens unchanged', () => {
|
||
expect(normalizeTerminalTextInput('git checkout -- file')).toBe('git checkout -- file')
|
||
})
|
||
})
|