From f922f8b5db1f3b92d954c43860c32cd251d5bc55 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 11:38:06 -0300 Subject: kinds #20, their tests and docs: T1's sessions are a terminal without graphics, so a PDF's key test is the base's text-layer one again beside the strip's (Session.graphics gives a frontend pictures), /addons says 2.2; pane cases for the hand over a link and a touchpad's fraction; reference.typ and the changelog say what a PDF does with and without graphics and what 2.2 added Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/behaviour/addons_pdf.zig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/behaviour/addons_pdf.zig') diff --git a/test/behaviour/addons_pdf.zig b/test/behaviour/addons_pdf.zig index f3c2d872..60379457 100644 --- a/test/behaviour/addons_pdf.zig +++ b/test/behaviour/addons_pdf.zig @@ -35,9 +35,10 @@ fn ctlOf(s: *Session, n: u32) ![]const u8 { test "addons: a PDF is the pdf addon's pane, its pages pictures, its page in its tag, its fit and tint in its ctl and stepped by its words, all of it back from a Dump" { var s = try Session.initFile(std.testing.allocator, "x\n"); defer s.deinit(); + s.graphics(); const n = try s.lookFile("docs/design.pdf"); try std.testing.expect(has(try s.read("/index"), " pdf ")); - try std.testing.expect(std.mem.startsWith(u8, try s.read("/addons"), "pdf 1 2.1 1 /")); + try std.testing.expect(std.mem.startsWith(u8, try s.read("/addons"), "pdf 1 2.2 1 /")); const pages = (try s.pdfPage(n))[1]; try std.testing.expectEqual(@as(u32, 16), pages); // Its first page, a picture over its body. @@ -46,7 +47,7 @@ test "addons: a PDF is the pdf addon's pane, its pages pictures, its page in its // Its tag: its page, then the core's art words (it placed a picture), // its path and its kind's words. const tag = try s.read(s.at("/pane/{d}/tag", .{n})); - try std.testing.expect(std.mem.startsWith(u8, tag, "[1/16] petscii:on palette:commodore ascii:on /")); + try std.testing.expect(std.mem.startsWith(u8, tag, "[1/16] petscii:off palette:commodore ascii:on /")); try std.testing.expect(has(tag, "/docs/design.pdf Term PdfSections PdfTint PdfFit Collapse Del")); try std.testing.expect(has(try ctlOf(&s, n), " fit:width tint:filtered mode:normal ")); // The words: bare they step, given a value they take it, any other @@ -134,6 +135,7 @@ test "addons: a PDF's / lists its hits as file.pdf:P:H rows in a +Search, n walk test "addons: a PDF's f is its PdfSections, its outline as places a Look in it goes to (none once the PDF is gone), and a jump back over a far one is Ctrl-o's, Forward's on, two places on a page a window apart two" { var s = try Session.initFile(std.testing.allocator, "x\n"); defer s.deinit(); + s.graphics(); const n = try s.lookFile("test/pdf-fixtures/outline.pdf"); try s.keys("f"); var list: u32 = 0; @@ -190,6 +192,7 @@ test "addons: a PDF's f is its PdfSections, its outline as places a Look in it g test "addons: a closed PDF is in Recent and its jumps, and a jump back to it opens it at its page; a tall page is shown a band of it at a time" { var s = try Session.initFile(std.testing.allocator, "x\n"); defer s.deinit(); + s.graphics(); const n = try s.lookFile("docs/design.pdf"); try s.write(s.at("/pane/{d}/look", .{n}), ":5\n"); const name = std.mem.trimEnd(u8, try s.read(s.at("/pane/{d}/name", .{n})), "\n"); -- cgit v1.3