Expand description
Headless test utilities for unit-testing TUI closures. Headless testing utilities.
TestBackend renders a UI closure to an in-memory buffer without a real
terminal. EventBuilder constructs event sequences for simulating user
input. Together they enable snapshot and assertion-based UI testing.
Structs§
- Event
Builder - Builder for constructing a sequence of input
Events. - Frame
Record - Snapshot of a single rendered frame, captured by
TestBackend::record_frames. - PtyBackend
pty-test - Drives the real
crate::runflush pipeline into an in-process byte sink, so escape-code / color-depth / image-protocol output is asserted end-to-end — the byte/protocol tier thatTestBackend’s buffer-only model deliberately cannot reach (seetests/visual_snapshots.rs). - PtyFrame
pty-test - Raw bytes emitted for a single rendered frame by
PtyBackend. - Test
Backend - Headless rendering backend for tests.
- Test
Sequence - Builder returned by
TestBackend::sequence.