diff options
Diffstat (limited to 'core/ninep')
| -rw-r--r-- | core/ninep/ctl.zig | 2 | ||||
| -rw-r--r-- | core/ninep/events.zig | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/ninep/ctl.zig b/core/ninep/ctl.zig index 84f3ba6b..033a9808 100644 --- a/core/ninep/ctl.zig +++ b/core/ninep/ctl.zig @@ -2055,7 +2055,7 @@ test "a language server question that finds nothing, cannot be answered, or is a _ = wr(p, root_exec, "Recent\n"); const listed = p.paneBySerial(try std.fmt.parseInt(u32, std.mem.trimEnd(u8, rd(p, root_exec, 0, 64).bytes, "\n"), 10)).?; p.lspRequest(listed, .incoming_calls, ""); - try testing.expect(std.mem.indexOf(u8, p.panes[listed].?.msg[0..p.panes[listed].?.msg_len], "Callers: only a file's pane asks") != null); + try testing.expect(std.mem.indexOf(u8, p.messages.saidBy(p.panes[listed].?), "Callers: only a file's pane asks") != null); // Nothing found: Callers says so, and the waiting write hears it. p.fs.late_failure_len = 0; p.lspRequest(id, .incoming_calls, ""); diff --git a/core/ninep/events.zig b/core/ninep/events.zig index e18b5d96..fe9ec79a 100644 --- a/core/ninep/events.zig +++ b/core/ninep/events.zig @@ -1089,20 +1089,20 @@ test "writing an event record back performs the action it names" { const w = wr(p, event, "FX0 10\n"); try testing.expectEqual(Status.ok, w.reply.status); - try testing.expectEqualStrings("fs-ran", pane.msg[0..pane.msg_len]); + try testing.expectEqualStrings("fs-ran", p.messages.saidBy(pane)); - pane.msg_len = 0; + p.messages.live_len = 0; try testing.expectEqual(Status.ok, wr(p, event, "FX0 10\nFX0 10\n").reply.status); - try testing.expectEqualStrings("fs-ran", pane.msg[0..pane.msg_len]); + try testing.expectEqualStrings("fs-ran", p.messages.saidBy(pane)); // The last record needs no newline, as any line file's last line. - pane.msg_len = 0; + p.messages.live_len = 0; const bare = wr(p, event, "FX0 10"); try testing.expectEqual(Status.ok, bare.reply.status); try testing.expectEqual(@as(u32, 6), bare.reply.written); - try testing.expectEqualStrings("fs-ran", pane.msg[0..pane.msg_len]); + try testing.expectEqualStrings("fs-ran", p.messages.saidBy(pane)); - pane.msg_len = 0; + p.messages.live_len = 0; for ([_][]const u8{ "FX0 10\nFQ0 1\n", // unknown type character "FX0 999\n", // out of range @@ -1111,7 +1111,7 @@ test "writing an event record back performs the action it names" { "F\n", }) |bad| { try testing.expectEqual(E.INVAL, wr(p, event, bad).errno()); - try testing.expectEqual(@as(usize, 0), pane.msg_len); + try testing.expectEqual(@as(usize, 0), p.messages.saidBy(pane).len); } // A look written back sets what look reads back. _ = wr(p, event, "FL0 3\n"); |
