summaryrefslogtreecommitdiff
path: root/test/process/root_ctl.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/process/root_ctl.zig')
-rw-r--r--test/process/root_ctl.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/process/root_ctl.zig b/test/process/root_ctl.zig
index 979cfc48..7c27d33e 100644
--- a/test/process/root_ctl.zig
+++ b/test/process/root_ctl.zig
@@ -12,7 +12,7 @@ const check = process.check;
pub const cases = .{
.{ "root-ctl: Exit is answered before the editor quits", exitAnswers },
- .{ "root-ctl: with nothing attached a message leaves after MessageLinger on its own clock", messagesExpire },
+ .{ "root-ctl: with nothing attached a message stays on the notice row until the next one: no clock takes it", messagesStay },
.{ "root-ctl: Putall with one pane's file changed on disk fails, answered once the other panes' saves have landed", putallAfterSaves },
.{ "root-ctl: long and odd paths where a path goes (name, look, DumpDir, Dump, Save) are refused or said, never a crash; a bad ThemeFile fails the write", oddPaths },
.{ "root-ctl: Restore asks once about unsaved text, is answered before it cuts every connection, and the dump's panes come back under their serials", restore },
@@ -26,7 +26,7 @@ fn exitAnswers(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
}
/// Nothing attached, no key, no click, no other request comes to move it along.
-fn messagesExpire(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+fn messagesStay(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// With nothing attached: a window always is.
try process.only(.tui);
var d = try process.Detached.start(gpa, exe, "msg", .{});
@@ -35,7 +35,10 @@ fn messagesExpire(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try expect(has(try d.files.screen(), "lingering-words"));
// Reading /screen is itself a request, so wait without asking.
process.sleep(2500);
- try expect(!has(try d.files.screen(), "lingering-words"));
+ try expect(has(try d.files.screen(), "lingering-words"));
+ try d.files.write("/pane/1/ctl", "Msg next-words\n");
+ const shown = try d.files.screen();
+ try expect(has(shown, "next-words") and !has(shown, "lingering-words"));
}
fn putallAfterSaves(gpa: std.mem.Allocator, exe: [:0]const u8) !void {