Files
orca/mobile/src/terminal/terminal-text-input-normalization.test.ts
Jinjing 3a7eb8f312 fix(mobile): drop smart-dash write-back recovery that kills iOS dictation (#8008)
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.
2026-07-09 20:38:17 -07:00

15 lines
592 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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')
})
})