summaryrefslogtreecommitdiff
path: root/test/process
diff options
context:
space:
mode:
Diffstat (limited to 'test/process')
-rw-r--r--test/process/root_ctl.zig9
-rw-r--r--test/process/tty_editing.zig3
-rw-r--r--test/process/tty_images.zig3
-rw-r--r--test/process/tty_layout.zig3
-rw-r--r--test/process/tty_terminals.zig3
5 files changed, 14 insertions, 7 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 {
diff --git a/test/process/tty_editing.zig b/test/process/tty_editing.zig
index 53e1da1e..efb5dc9b 100644
--- a/test/process/tty_editing.zig
+++ b/test/process/tty_editing.zig
@@ -371,7 +371,8 @@ fn chordcut(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// unrelated right column untouched. Give the caller enough cells that the selected
// `echo B''OO g.txt` remains one displayed row; this test is about chords, not
// soft-wrap traversal.
- try t.start(31, 120, &.{ "-n", "3" });
+ // A row more than its panes take: the notice row under them.
+ try t.start(32, 120, &.{ "-n", "3" });
try t.wait(8000, "f.txt");
try t.stable(700, 20000);
// open f.txt: click a body spot, type the name, look it
diff --git a/test/process/tty_images.zig b/test/process/tty_images.zig
index 5c39d4f3..9c37a40d 100644
--- a/test/process/tty_images.zig
+++ b/test/process/tty_images.zig
@@ -15,7 +15,8 @@ fn images(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "images");
defer t.deinit();
try t.ppmDiag("pic.ppm");
- try t.start(31, 150, &.{ "-n", "3" });
+ // A row more than its panes take: the notice row under them.
+ try t.start(32, 150, &.{ "-n", "3" });
try t.wait(8000, "pic.ppm");
try t.stable(700, 20000);
try t.press("left", "5", 9);
diff --git a/test/process/tty_layout.zig b/test/process/tty_layout.zig
index 08a02488..3c50b8a5 100644
--- a/test/process/tty_layout.zig
+++ b/test/process/tty_layout.zig
@@ -290,7 +290,8 @@ fn layout_open(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
try t.dir("sub");
try t.file("sub/f.txt", "echo 'TTY'OK");
- try t.start(31, 100, &.{ "-n", "3" });
+ // A row more than its panes take: the notice row under them.
+ try t.start(32, 100, &.{ "-n", "3" });
try t.wait(8000, "sub");
try t.stable(700, 20000);
// give pane 0 (top-left) some content so its content-height split is visible
diff --git a/test/process/tty_terminals.zig b/test/process/tty_terminals.zig
index 9f7c9308..550d5922 100644
--- a/test/process/tty_terminals.zig
+++ b/test/process/tty_terminals.zig
@@ -590,7 +590,8 @@ fn reflow(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn respawn(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "respawn");
defer t.deinit();
- try t.start(31, 140, &.{ "-n", "3" });
+ // A row more than its panes take: the notice row under them.
+ try t.start(32, 140, &.{ "-n", "3" });
try t.wait(8000, "Newcol Joincol");
try t.stable(700, 20000);
// middle-click Del on the lower-left pane's tag: the pane id is freed while