diff options
Diffstat (limited to 'core/ninep/ctl.zig')
| -rw-r--r-- | core/ninep/ctl.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/ninep/ctl.zig b/core/ninep/ctl.zig index 84f3ba6b..e47aec94 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, ""); @@ -2264,7 +2264,7 @@ test "a column takes panes until their documented minimums fill it, not until no const new = @backingInt(tree.TopFile.new); while (call(p, .{ .tag = 1, .op = .open, .node = new }).reply.status == .ok) p.sync(); p.sync(); - const avail = p.view().screen_h - (p.topBarHeight() + layout.columnBarHeight(p)); + const avail = p.view().screen_h - (p.topBarHeight() + layout.columnBarHeight(p) + layout.noticeRowHeight(p)); for (0..p.view().ncol) |c| { var need: u32 = 0; for (p.view().cols[c].panes[0..p.view().cols[c].n]) |k| need += layout.minRows(p, k); @@ -2388,7 +2388,9 @@ test "a file changed on disk under unsaved edits is not reloaded: it says so, ge pardes.panes.File.changed(p, 0, "three\n"); try testing.expectEqualStrings("two\nmine\n", f.content); try testing.expect(f.revision != f.saved_revision); - try testing.expect(th.logHas(p, "changed on disk (get reloads it, Save overwrites it)")); + // ...and asks, in its tag (Messages.waiting), which /log hears. + try testing.expect(p.messages.waiting(p.panes[0].?) != null); + try testing.expect(th.logHas(p, "changed on disk\n")); var want: [32]u8 = undefined; try testing.expect(th.logHas(p, try std.fmt.bufPrint(&want, "changed {d}\n", .{serial}))); // Exit and get still ask about the edits. |
