summaryrefslogtreecommitdiff
path: root/test/panes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/panes.zig')
-rw-r--r--test/panes.zig13
1 files changed, 5 insertions, 8 deletions
diff --git a/test/panes.zig b/test/panes.zig
index a6b6aecd..f51c2b27 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -2247,19 +2247,16 @@ const OutputTests = struct {
};
const ImageTests = struct {
- const State = panes.Image.State;
- const tagPrefix = panes.Image.tagPrefix;
-
test "pane-local renderer choices are visible in the image tag" {
- const state: State = .{ .path = @constCast("/tmp/picture.ppm"), .glyph_art = true, .pmode = .terminal, .ascii = false };
- const tag = try tagPrefix(std.testing.allocator, &state, state.glyph_art);
- defer std.testing.allocator.free(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);
+ 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",
- tag,
+ try pardes.tagline.tagPrefix(p, pane),
);
}
-
};
const PdfTests = struct {