summaryrefslogtreecommitdiff
path: root/test/fs_namespace.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs_namespace.zig')
-rw-r--r--test/fs_namespace.zig15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/fs_namespace.zig b/test/fs_namespace.zig
index d54eb9a2..ac638e41 100644
--- a/test/fs_namespace.zig
+++ b/test/fs_namespace.zig
@@ -1,5 +1,6 @@
const std = @import("std");
const pardes = @import("pardes");
+const image = pardes.image;
const filesystem = pardes.filesystem;
test "runtime Mount and Unmount copy command arguments and change Look resolution" {
@@ -302,14 +303,18 @@ test "images decode through explicit filesystem mounts, and a dump reads one on
defer p.deinit();
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
+ // Its decode lands at the step after it (a job, run here at once).
+ p.update(.tick);
_ = try p.render(arena.allocator());
- const pane = p.panes[0].?;
- const state = pane.image.?;
- try std.testing.expectEqual(@as(usize, 1), state.iw);
- try std.testing.expectEqual(@as(usize, 1), state.ih);
+ const shown = p.surface.placements.items;
+ try std.testing.expectEqual(@as(usize, 1), shown.len);
+ try std.testing.expectEqual(@as(u32, 1), shown[0].raster.w);
+ try std.testing.expectEqual(@as(u32, 1), shown[0].raster.h);
// The picture's bytes are in the dump: it comes back as it was shown.
try pardes.dump.dumpState(p);
const restored = try pardes.dump.initFromDump(gpa, .{ .tty_only = true }, p.dump_out.?);
defer restored.deinit();
- try std.testing.expectEqualStrings(bytes, restored.panes[0].?.image.?.raw);
+ const slot = restored.panes[0].?.addon.?;
+ var kept: [64]u8 = undefined;
+ try std.testing.expectEqualStrings(bytes, kept[0..image.kind.dump.?(slot.st, &kept, kept.len)]);
}