chore: reorganize fixtures and harden heading PNG tests#11
Merged
Conversation
Consolidate 7 overlapping markdown fixtures into 4 purpose-named ones, add a `specialized/` subdir for narrow single-purpose fixtures, and split the heading PNG integration test into 4 focused assertions. Fixture layout: - supported-syntax.md: one comprehensive fixture covering current + roadmap syntax (HTML, images, wrap-indent, metadata, TOC), replacing full-syntax / full-syntax-zh / tasklist / emoji-test / toc-test - unsupported-syntax.md: trimmed to out-of-scope features only - specialized/headings-basic.md: minimal H1/H2/H3 for PNG height test - specialized/headings-emoji.md: emoji + CJK headings, guards against font fallback regressions silently rendering blank glyphs - specialized/large.md: ~15k-line stress fixture from scripts/gen-large-fixture.sh - links/: kept as multi-file TUI link-nav fixture Heading test improvements (tests/headings.rs): - Split the bundled test into 4 focused tests so failures point directly at the broken property - Verify every APC frame's first-chunk header uses `a=T` display form, not just the first occurrence in stdout — a stray `a=t` in cat mode silently renders blank - Add emoji_headings_emit_decodable_nonblank_pngs to catch emoji font fallback regressions docs/TERMINAL_PROTOCOLS.md: reference for the ANSI / Kitty graphics protocol layering, how fixtures/expected/*.ansi captures both, and how strip_kitty_images / extract_kitty_frames work. Snapshot baselines regenerated for the two consolidated fixtures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fixtures/specialized/subdir houses narrow single-purpose fixtures (headings basics, headings emoji, large stress)a=Ton every emitted APC frame (the old check only looked for one occurrence in stdout, so a straya=twould slip through and render blank in cat mode)headings-emoji.mdfixture +emoji_headings_emit_decodable_nonblank_pngstest guards against emoji font fallback regressions silently producing blank glyphsdocs/TERMINAL_PROTOCOLS.mdexplaining the ANSI / Kitty graphics protocol layering, howfixtures/expected/*.ansicaptures both, and howstrip_kitty_images/extract_kitty_framesworkFixture layout after this change
Snapshot baselines for the two consolidated fixtures were regenerated.
TODO.md's "整理测试用的 markdown 文件" item is checked off.Test plan
make checkpasses (fmt-check + clippy + tests, including the 4 new heading tests and 2 snapshot tests)cargo run -- --cat fixtures/specialized/large.mdexits cleanly on the stress fixturecargo run -- --tui fixtures/links/index.mdstill navigates link-following correctly (manual)cargo run -- --tui fixtures/supported-syntax.mdrenders all 12 sections without panic (manual)🤖 Generated with Claude Code