From 96cabca7ebe287692ebdff0dba6bb2897eba9d3e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 23:57:01 -0300 Subject: pdf: the test PDFs are files under test/pdf-fixtures, byte for byte what the generators wrote, where pdf.zig wrote each object by object (139 lines fewer there): testFixture reads one, the two outlines sized by the bridge's limits stay generated, and the sections bench embeds its outline Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/ninep/ctl.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ninep/ctl.zig') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 7c566f23..a1504acb 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -2173,7 +2173,7 @@ test "a truncated PDF fails its look with its path and why" { defer p.deinit(); var tmp = testing.tmpDir(.{}); defer tmp.cleanup(); - const bytes = try @import("mupdf").makeLinksTestPdf(testing.allocator); + const bytes = try @import("mupdf").testFixture(testing.allocator, "links.pdf"); defer testing.allocator.free(bytes); try tmp.dir.writeFile(testing.io, .{ .sub_path = "cut.pdf", .data = bytes[0..40] }); var dir_buf: [4096]u8 = undefined; @@ -2190,7 +2190,7 @@ test "a PDF's body reads its page's text layer, and takes no write" { defer p.deinit(); var tmp = testing.tmpDir(.{}); defer tmp.cleanup(); - const bytes = try @import("mupdf").makeLinksTestPdf(testing.allocator); + const bytes = try @import("mupdf").testFixture(testing.allocator, "links.pdf"); defer testing.allocator.free(bytes); try tmp.dir.writeFile(testing.io, .{ .sub_path = "doc.pdf", .data = bytes }); var dir_buf: [4096]u8 = undefined; -- cgit v1.3