summaryrefslogtreecommitdiff
path: root/test/session.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/session.zig')
-rw-r--r--test/session.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/session.zig b/test/session.zig
index fd956aa9..056966b9 100644
--- a/test/session.zig
+++ b/test/session.zig
@@ -30,6 +30,8 @@ pub const Session = struct {
arena: std.heap.ArenaAllocator,
/// Saves the core asked its host for (a host would perform them).
saved: usize = 0,
+ /// The last link the core asked its host to open (a browser would).
+ link: []const u8 = "",
/// The words of the last refusal `refused` answered.
said: []const u8 = "",
tag: u64 = 0,
@@ -277,6 +279,7 @@ pub const Session = struct {
fn drain(s: *Session) void {
while (pardesOf(s).nextEffect()) |e| switch (e) {
.save_file, .save_text => s.saved += 1,
+ .open_link => |u| s.link = s.arena.allocator().dupe(u8, u.slice()) catch "",
// Into the session's state (a database in memory, or its file).
.write_dump => pardes.host_io.writeDump(pardesOf(s), pardesOf(s).dump_out.?),
.addon => pardesOf(s).perform(e),