summaryrefslogtreecommitdiff
path: root/test/pdf.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/pdf.zig')
-rw-r--r--test/pdf.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/pdf.zig b/test/pdf.zig
index 25d0de76..69a82123 100644
--- a/test/pdf.zig
+++ b/test/pdf.zig
@@ -135,9 +135,9 @@ const PdfLinkTests = struct {
const choices_id = for (p.panes, 0..) |slot, id| {
if (slot == choices) break id;
} else return error.MissingPdfLinkChoices;
- p.lookAt(choices_id, "https://example.com/embedded");
+ pardes.look.lookAt(p, choices_id, "https://example.com/embedded");
try expectOpened(p, "https://example.com/embedded");
- p.lookAt(choices_id, "target.txt");
+ pardes.look.lookAt(p, choices_id, "target.txt");
try std.testing.expectEqualStrings("chosen file\n", p.panes[p.active].?.file.?.content);
p.active = 0;
_ = try p.render(frame.allocator());
@@ -349,16 +349,16 @@ test "PdfSections Look follows the exact owning PDF, not an equal path" {
const first_row = std.mem.sliceTo(first_output.file.?.content, '\n');
const target = first_row[0 .. std.mem.indexOfScalar(u8, first_row, ' ') orelse first_row.len];
- p.lookAt(first_output_id, target);
+ pardes.look.lookAt(p, first_output_id, target);
try std.testing.expectEqual(@as(usize, 0), p.active);
- p.lookAt(duplicate_output_id, target);
+ pardes.look.lookAt(p, duplicate_output_id, target);
try std.testing.expectEqual(duplicate_id, p.active);
// Once the original document is gone, its output cannot reinterpret an
// old ordinal against the still-open equal-path duplicate.
try std.testing.expect(pardes.test_api.runBuiltin(p, "Del", 0, "", null));
p.active = first_output_id;
- p.lookAt(first_output_id, target);
+ pardes.look.lookAt(p, first_output_id, target);
try std.testing.expectEqual(first_output_id, p.active);
}
@@ -881,7 +881,7 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
try std.testing.expect(pane.pdf.?.document_scroll_y > before_height_scroll);
const revision_before_search = active_raster.revision;
- try p.runSearch(0, "Pardes", .text, .top);
+ try pardes.look.runSearch(p, 0, "Pardes", .text, .top);
try std.testing.expectEqualStrings("Pardes", pane.pdf.?.search_query);
try std.testing.expectEqual(revision_before_search, active_raster.revision);
const results_id = pane.search_pane orelse return error.MissingPdfSearchResults;
@@ -1578,7 +1578,7 @@ test "PDF n/N addresses and reveals distinct MuPDF hits on one page" {
p.locations_config.context = 2;
p.locations_config.tscontext = true;
- try p.runSearch(0, "Pardes", .text, .top);
+ try pardes.look.runSearch(p, 0, "Pardes", .text, .top);
const results_id = pane.search_pane orelse return error.MissingPdfSearchResults;
const results = p.panes[results_id].?.file.?;
var found: [3]bool = @splat(false);