diff options
Diffstat (limited to 'test/panes.zig')
| -rw-r--r-- | test/panes.zig | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/panes.zig b/test/panes.zig index f51c2b27..2a24e62e 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -2250,7 +2250,15 @@ const ImageTests = struct { test "pane-local renderer choices are visible in the image tag" { const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true }); defer p.deinit(); - const pane = try pardes.Kind.open(p, p.freeSlot().?, &image.kind, "/tmp/picture.ppm", null); + pardes.image.start(std.testing.io, std.testing.allocator); + defer pardes.image.stop(); + // A picture shown (its decode landed, a frame drawn): the core's + // art words after the kind's `img`, then its path. + const id = p.freeSlot().?; + const pane = try pardes.Kind.open(p, id, pardes.Kind.image, "/tmp/picture.ppm", "P6\n1 1\n255\n\x01\x02\x03"); + while (p.nextEffect()) |e| p.perform(e); + pardes.exec.placeNew(p, 0, 0, id, .doc); + _ = try p.render(p.scratch.allocator()); pane.addon.?.art = .{ .glyph = true, .palette = .terminal, .ascii = false }; try std.testing.expectEqualStrings( config.tag_image ++ " petscii:on palette:terminal ascii:off /tmp/picture.ppm", |
