summaryrefslogtreecommitdiff
path: root/test/behaviour/addons_pdf.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behaviour/addons_pdf.zig')
-rw-r--r--test/behaviour/addons_pdf.zig7
1 files changed, 5 insertions, 2 deletions
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");