summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/behaviour/addons_pdf.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/behaviour/addons_pdf.zig b/test/behaviour/addons_pdf.zig
index cf5c8009..18fa503c 100644
--- a/test/behaviour/addons_pdf.zig
+++ b/test/behaviour/addons_pdf.zig
@@ -132,6 +132,22 @@ test "addons: a PDF's / lists its hits as file.pdf:P:H rows in a +Search, n walk
try std.testing.expect(try s.focused() != n);
}
+test "addons: a PDF's / of what its page has not, and f on a PDF with no outline, each say so and the session goes on (the bridge's none is a NULL with a count of 0: a safe build's abort before)" {
+ var s = try Session.initFile(std.testing.allocator, "x\n");
+ defer s.deinit();
+ const n = try s.lookFile("docs/design.pdf");
+ // No page has it: page 1's hits of it asked, none; a hit of it a miss.
+ try s.keys("/zzqxv\r");
+ try std.testing.expectEqual(@as(u32, 1), (try s.pdfPage(n))[0]);
+ _ = try s.refused(s.at("/pane/{d}/look", .{n}), ":1:1\n");
+ try std.testing.expect(has(try s.read("/log"), "design.pdf has no search hit 1 on page 1"));
+ // tall.pdf has no outline.
+ const t = try s.lookFile("test/pdf-fixtures/tall.pdf");
+ try s.keys("f");
+ try std.testing.expect(has(try s.read("/log"), "PdfSections: this PDF has no outline"));
+ try std.testing.expectEqual(t, try s.focused());
+}
+
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();