summaryrefslogtreecommitdiff
path: root/core/replica.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/replica.zig')
-rw-r--r--core/replica.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/replica.zig b/core/replica.zig
index 50615fc0..4d1a635c 100644
--- a/core/replica.zig
+++ b/core/replica.zig
@@ -7133,6 +7133,18 @@ test "a client joined after a script truncated a pane's tag writes the tag its s
try n.agree();
}
+test "a client joined after a script truncated the workspace's tag writes the tag its session writes" {
+ var n = try NinepJoin.init("one\n", TestHost.host());
+ defer n.deinit();
+ const tag: u64 = @backingInt(pardes.ctlfs.TopFile.tag);
+ const h = (try n.serve(.{ .tag = 1, .op = .open, .node = tag, .omode = 1 }, true)).handle;
+ _ = try n.serve(.{ .tag = 2, .op = .setattr, .node = tag, .handle = h, .truncate = true }, true);
+ try n.join();
+ _ = try n.serve(.{ .tag = 3, .op = .write, .node = tag, .handle = h, .data = "Exit\n" }, true);
+ _ = try n.serve(.{ .tag = 4, .op = .release, .node = tag, .handle = h, .opened = true }, true);
+ try n.agree();
+}
+
test "a client joined while a chorded exec waits for its event reader's write-back runs it with its argument, as its session does" {
var n = try NinepJoin.init("Msg said\narg-text\n", TestHost.host());
defer n.deinit();