1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Test rig: an in-memory terminal double capturing the byte stream,
//! plus a small VT interpreter that applies emitted bytes to a model
//! screen — so tests can assert "the bytes we emit produce the frame we
//! intended" (the diff/present correctness property), snapshot frames as
//! text, drive scripted input, and fuzz parsers deterministically.
//!
//! OWNER: REDTEAM. Doctrine: `docs/design/testing.md`.
//!
//! Map:
//! - [`vt`] — `VtScreen`, the VT100/xterm model (ground truth; CSI
//! dispatch lives in a private sibling module)
//! - [`grid`] — the model's cell grid + wide-glyph pairing invariant
//! - [`palette`] — embedded xterm-256 palette (indexed SGR -> `Rgba`)
//! - [`capture`] — `CaptureTerm`, in-memory terminal double
//! - [`snapshot`] — golden snapshot assertions (UPDATE_GOLDENS=1)
//! - [`fuzzish`] — seeded PRNG + hostile byte-soup generators
//! - [`mod@bench`] — std-only timing harness for `#[ignore]`d perf tests
//!
//! This module ships in the library (not `#[cfg(test)]`) so integration
//! tests and other modules' unit tests can use it; it costs nothing
//! unless referenced and depends only on `crate::base` + unicode-width.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use assert_snapshot;
pub use ;