Skip to content

test(html): render csv and zip in the output tests - #675

Merged
andiwand merged 1 commit into
mainfrom
test/csv-output
Aug 9, 2026
Merged

test(html): render csv and zip in the output tests#675
andiwand merged 1 commit into
mainfrom
test/csv-output

Conversation

@andiwand

@andiwand andiwand commented Aug 9, 2026

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Fifth of the csv stack. Based on #669 — the value types change what a cell renders as, so the reference output has to be generated with them in.

Both csv and zip sat behind a TODO enable in html_output_test.cpp, and for different reasons.

Csv

Skipped because it rendered as a line list, which was not worth pinning. It renders as a table since #668, so the skip has outlived its reason. The reference output gains document.html and sheet0.html — the one-sheet spreadsheet the generic renderer walks, capped at the suite's 4000 rows.

Until now the only thing pinned for a csv was meta.json, which is written before the skip. That is also why the documentType line reverted in #668 needed an output-repo commit of its own; it is folded into the same one here.

Zip

Skipped because there was nothing to render. get_test_files walks the input directory and maps by extension, and the public input set had no archive at all — so the skip was dead code.

zip/small.zip is new input and deliberately tiny: 271 bytes, two text files.

  Length      Date    Time    Name
---------  ---------- -----   ----
       14  01-01-2026 00:00   hello.txt
       33  01-01-2026 00:00   nested/note.txt

The reason for the size is html/filesystem.cpp: an archive renders as a file listing and every entry becomes a data:application/octet-stream;base64,… download link (html/common.cpp:96). A real-world archive would carry its whole content into the reference output, base64-inflated. At this size the whole listing is 854 bytes and reads in a diff:

<a href="data:application/octet-stream;base64,SGVsbG8sIHdvcmxkIQo=" download="hello.txt">

Json stays skipped — no renderer of its own yet.

Data repositories

Both pins move, and both commits are on main of their repo:

  • input OpenDocument.testd7c093d a small zip to render
  • reference output OpenDocument.test.outpute9aa12f zip: render the file listing, on top of 33300e7 csv: render as a table

Verification

Full suite, 815 passed / 8 skipped. diff -rq of the generated tree against the reference is empty for both repos — the only files that moved are the three the two new renders produce.

Base automatically changed from feat/csv-value-types to main August 9, 2026 11:51
Both were skipped with a `TODO enable` next to them. Csv was skipped because it
rendered as a line list, which was not worth pinning; it renders as a table
now, so the skip has outlived its reason. Zip was skipped because there was no
zip to render — the suite walks the input directory, and the public set had
none.

So the reference output gains what the two paths actually emit: `document.html`
and `sheet0.html` for the csv, the one-sheet spreadsheet the generic renderer
walks, and `files.html` for the zip.

`zip/small.zip` is new input, and deliberately tiny — 271 bytes, two text
files. An archive renders as a file listing with every entry inlined as a
`data:application/octet-stream;base64` url, so a real-world archive would carry
its whole content into the reference output. At this size the listing is 854
bytes and reviewable in a diff, while exercising the same code.

Json stays skipped: it has no renderer of its own yet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nk1S12YmjBsmksSJ4tVB3X
@andiwand
andiwand enabled auto-merge (squash) August 9, 2026 11:59
@andiwand
andiwand disabled auto-merge August 9, 2026 12:05
@andiwand
andiwand merged commit 17f7018 into main Aug 9, 2026
34 checks passed
@andiwand
andiwand deleted the test/csv-output branch August 9, 2026 12:06
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.

1 participant