summaryrefslogtreecommitdiff
path: root/src/9p_io.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/9p_io.zig')
-rw-r--r--src/9p_io.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig
index c3af07d3..377440bd 100644
--- a/src/9p_io.zig
+++ b/src/9p_io.zig
@@ -1977,6 +1977,14 @@ test "a change waits while the editor is out mid-step, a read does not, and the
pardes.turn.wake();
try testing.expect(writer.done.load(.acquire));
if (writer.failure) |err| return err;
+ // Its bytes are held until its open is let go (pane.zig `batchFor`), and
+ // the client lets it go without waiting: rested again until that lands,
+ // the body read only while the editor has the turn.
+ while (!std.mem.eql(u8, pane.file.?.content, "after\n") and Client.nowMs() < deadline) {
+ pardes.turn.rest();
+ Client.nap(1);
+ pardes.turn.wake();
+ }
try testing.expectEqualStrings("after\n", pane.file.?.content);
}