Documentation
¶
Overview ¶
Package parity provides the test harness for TUI byte-level and visible-state parity against upstream pi-tui.
Two test styles:
Headless byte parity (`AssertByteParity`): runs a renderer function against an in-process Grid, captures the output stream, and asserts the resulting grid state matches a golden file. Used for fast unit-level parity checks of individual components.
Live tmux parity (`AssertLiveParity`): drives both `~/.local/bin/pig` and the installed upstream pi binary through a tmux scenario, captures panes, and asserts the visible state matches.
TUI parity is enforced by parity/scenarios/*.tmux scenarios.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertByteParity ¶
AssertByteParity runs `pigRender` and `upstreamRender` into independent grids and asserts the resulting visible state is identical line-for-line. Both functions receive a fresh buffer they should write their full render output into.
On failure, prints a side-by-side diff. Style differences are NOT compared here (rendering colour is a separate axis verified by AssertStyleParity).
func AssertGolden ¶
AssertGolden compares the visible state of `render` against a golden file in testdata/<name>.txt. Update goldens via UPDATE_GOLDEN=1.
Types ¶
This section is empty.