diff options
Diffstat (limited to 'test/mode.zig')
| -rw-r--r-- | test/mode.zig | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/test/mode.zig b/test/mode.zig index 7335b4ef..1f21c7db 100644 --- a/test/mode.zig +++ b/test/mode.zig @@ -89,25 +89,10 @@ test "Mode from actual tag Exec preserves parked file and output insert transact } } -test "Mode leaves image and PDF document modes unchanged" { +test "Mode leaves a kind's pane (a picture) as it is" { const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true }); defer p.deinit(); const picture = try pardes.Kind.open(p, 1, pardes.Kind.test_kind.of(p), "/mode-test.png", ""); try mode(p, 1, .normal); try std.testing.expect(picture.addon != null); - if (comptime panes.Pdf.enabled) { - var tmp = std.testing.tmpDir(.{}); - defer tmp.cleanup(); - const bytes = try panes.Pdf.pdf.testFixture(std.testing.allocator, "links.pdf"); - defer std.testing.allocator.free(bytes); - try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "mode.pdf", .data = bytes }); - var buffer: [4096]u8 = undefined; - 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, .last); - const page = document.pdf.?.page; - try mode(p, 2, .normal); - try std.testing.expectEqual(page, document.pdf.?.page); - } } |
