summaryrefslogtreecommitdiff
path: root/internal/repl/tty_test.go
AgeCommit message (Collapse)Author
2026-05-23test: add unit tests for REPL subsystemsPaul Buetow
Add dedicated unit tests for four REPL components that lacked test coverage: - SignalHandler (signal_test.go): 5 tests covering constructor, Stop() without Start, callback execution, goroutine semantics, and single-shot signal handling behavior - TTYChecker (tty_test.go): 5 tests covering EnsureTTY error in non-TTY context, error message content, IsTTY return value, IsTTY/EnsureTTY consistency, and idempotent behavior - HistoryManager (history_test.go): 11 tests covering constructor, Path() with default and custom baseDir, Save/Load roundtrip, maxEntries truncation, non-existent file, empty file/slice, special characters, and file overwrite behavior. Added WithBaseDir() method to enable testing with temp directories. - AutoCompleteAdapter (completer_adapter_test.go): 5 tests covering Do() with empty/whitespace input, exact/partial/no matches, case-insensitive matching, multi-word completion, cursor position, common prefix calculation, and command order preservation