summaryrefslogtreecommitdiff
path: root/test/mode.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 20:03:16 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit741d088c60da40fd811dedc80d8e62753959bfea (patch)
treeb414fb6f9bf4c246435c356f306a6792db37707b /test/mode.zig
parentb6200709aa5e42f7a3d3702489301c71da8cd65d (diff)
downloadpardes-741d088c60da40fd811dedc80d8e62753959bfea.tar.gz
pardes-741d088c60da40fd811dedc80d8e62753959bfea.zip
A look at a PDF's page past its last is a miss, "has no page N", never the last page in its place
manual.pdf:999 on a twelve-page PDF showed page 12 and said nothing, so a stale or mistyped page number looked like a place found. It is now the miss a line past a file's end is, whether the PDF is open (it stays on its page) or not (nothing opens). A restore or a start-up page past the end still lands on the last. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/mode.zig')
-rw-r--r--test/mode.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/mode.zig b/test/mode.zig
index 767cda93..f49c434c 100644
--- a/test/mode.zig
+++ b/test/mode.zig
@@ -109,7 +109,7 @@ test "Mode leaves image and PDF document modes unchanged" {
const len = try tmp.dir.realPath(std.testing.io, &buffer);
const path = try std.fmt.allocPrint(std.testing.allocator, "{s}/mode.pdf", .{buffer[0..len]});
defer std.testing.allocator.free(path);
- const document = try panes.Pdf.openPane(p, 2, path, 1);
+ const document = try panes.Pdf.openPane(p, 2, path, 1, .last);
const page = document.pdf.?.page;
try mode(p, 2, .normal);
try std.testing.expectEqual(page, document.pdf.?.page);