Skip to content

test(terminal): add cell-grid verification via libghostty-vt#383

Open
nlopes wants to merge 1 commit intomainfrom
claude/review-libghostty-tickets-BrBkQ
Open

test(terminal): add cell-grid verification via libghostty-vt#383
nlopes wants to merge 1 commit intomainfrom
claude/review-libghostty-tickets-BrBkQ

Conversation

@nlopes
Copy link
Copy Markdown
Owner

@nlopes nlopes commented Apr 9, 2026

Parse converter output through the real Ghostty VT emulator and assert
on the rendered cell grid (char, bold/italic, OSC 8 hyperlink) instead
of diffing raw ANSI byte streams. This layer survives harmless SGR
reorderings and actually exercises the rendering pipeline a terminal
user experiences, catching bugs where the bytes look right but would
render wrong.

The existing fixture-based integration tests are kept as-is; this is
additive. Tests live in converters/terminal/tests/grid_test.rs and
cover section headers, paragraphs, bold/italic inline formatting,
ordered/unordered lists, NOTE and WARNING admonitions, tables,
source blocks, and OSC 8 hyperlink attribution (both with the
capability forced on and off).

  • Adds libghostty-vt 0.1.1 as a dev-dependency of the terminal crate.
  • Adds Processor::with_capabilities() so tests can force OSC 8 on
    regardless of the host TERM environment (mirrors the existing
    with_terminal_width() builder pattern).
  • Installs Zig 0.15.1 via mlugg/setup-zig in the test-converters,
    clippy, and doctest CI jobs, which are the jobs that compile the
    dev-dependency through --all-targets / --doc.
  • Updates acdc-converters-terminal CHANGELOG.

Parse converter output through the real Ghostty VT emulator and assert
on the rendered cell grid (char, bold/italic, OSC 8 hyperlink) instead
of diffing raw ANSI byte streams. This layer survives harmless SGR
reorderings and actually exercises the rendering pipeline a terminal
user experiences, catching bugs where the bytes look right but would
render wrong.

The existing fixture-based integration tests are kept as-is; this is
additive. Tests live in converters/terminal/tests/grid_test.rs and
cover section headers, paragraphs, bold/italic inline formatting,
ordered/unordered lists, NOTE and WARNING admonitions, tables,
source blocks, and OSC 8 hyperlink attribution (both with the
capability forced on and off).

- Adds libghostty-vt 0.1.1 as a dev-dependency of the terminal crate.
- Adds Processor::with_capabilities() so tests can force OSC 8 on
  regardless of the host TERM environment (mirrors the existing
  with_terminal_width() builder pattern).
- Installs Zig 0.15.1 via mlugg/setup-zig in the test-converters,
  clippy, and doctest CI jobs, which are the jobs that compile the
  dev-dependency through --all-targets / --doc.
- Updates acdc-converters-terminal CHANGELOG.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants