summaryrefslogtreecommitdiff
path: root/test/process/tty_layout.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/process/tty_layout.zig')
-rw-r--r--test/process/tty_layout.zig30
1 files changed, 19 insertions, 11 deletions
diff --git a/test/process/tty_layout.zig b/test/process/tty_layout.zig
index 00197a5c..76bed736 100644
--- a/test/process/tty_layout.zig
+++ b/test/process/tty_layout.zig
@@ -56,7 +56,9 @@ fn colgrip(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.done();
}
-// A default pane-tag command collapses to one row and restores the body.
+// A pane-tag command collapses to one row and restores the body. Collapse
+// and Save are no computed words of a clean file's tag (UX K'1), so they are
+// typed into the tag's own text first, where a click runs them as before.
// Exercise real middle clicks twice, then the tag's own execute key twice: a
// click types into the tag, Esc is its normal mode, and Tab executes there.
fn collapse(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
@@ -66,6 +68,12 @@ fn collapse(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(25, 160, &.{"kept.txt"});
try t.wait(8000, "KEEP-THIRD");
try t.stable(500, 15000);
+ try t.key(": : i");
+ try t.send("Collapse Save");
+ try t.key("esc");
+ try t.settle(100);
+ try t.key(":");
+ try t.stable(400, 5000);
try t.snap("before");
try t.press("middle", "@Collapse", 3);
try t.release("middle", "@Collapse", 3);
@@ -335,9 +343,9 @@ fn layout_open(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// execute the file's command (middle drag over line 1): it runs as a command
// pane for sub/, forked at the bottom of the rightmost column, splitting only
// the pane above it
- try t.press("middle", "8", 25);
- try t.drag("middle", "19", 25);
- try t.release("middle", "19", 25);
+ try t.press("middle", "8", 23);
+ try t.drag("middle", "19", 23);
+ try t.release("middle", "19", 23);
try t.wait(10000, "TTYOK");
try t.motion("40", 27);
try t.stable(700, 10000);
@@ -369,7 +377,7 @@ fn shrinktag(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
try t.snap("before");
// drag the lower pane's grip up under pane 0's tag row: it keeps 2 body rows
- try t.press("left", "1", 18);
+ try t.press("left", "1", 17);
try t.drag("left", "1", 3);
try t.release("left", "1", 3);
try t.motion("40", 25);
@@ -386,15 +394,15 @@ fn shrinktag(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
// re-enlarge: the lower pane's grip, now under pane 0's 2 body rows, pulled
// back down
- try t.press("left", "1", 7);
- try t.drag("left", "1", 18);
- try t.release("left", "1", 18);
+ try t.press("left", "1", 6);
+ try t.drag("left", "1", 17);
+ try t.release("left", "1", 17);
try t.motion("40", 25);
try t.stable(500, 8000);
try t.snap("restored");
// the bottom pane stops at ITS tag and 2 rows too: its grip dragged past the
// bottom
- try t.press("left", "1", 18);
+ try t.press("left", "1", 17);
try t.drag("left", "1", 31);
try t.release("left", "1", 31);
try t.motion("40", 25);
@@ -578,9 +586,9 @@ fn windowops(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.motion("20", 16);
try t.stable(400, 5000);
try t.snap("hover-h");
- // resize the left pair by the lower pane's grip, 4 rows up (a terminal has no
+ // resize the left pair by the lower pane's grip, 3 rows up (a terminal has no
// rule between panes; pane 0's last row is now 13)
- try t.press("left", "1", 18);
+ try t.press("left", "1", 17);
try t.drag("left", "1", 14);
try t.release("left", "1", 14);
try t.stable(500, 8000);