summaryrefslogtreecommitdiff
path: root/test/behaviour/modes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behaviour/modes.zig')
-rw-r--r--test/behaviour/modes.zig17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/behaviour/modes.zig b/test/behaviour/modes.zig
index 0f7c9d26..47f2ccd2 100644
--- a/test/behaviour/modes.zig
+++ b/test/behaviour/modes.zig
@@ -98,7 +98,8 @@ test "modes: Esc back into a file leaves its view where it was, and a look centr
// The other arm still centres: a look's `:NN`.
const line = 60;
try s.write(s.at("/pane/{d}/look", .{doc}), s.at(":{d}\n", .{line}));
- const rows = (try s.where("Term Save Mode"))[1] - (try s.where("/test.txt"))[1] - 1;
+ // (The shell's tag: its computed Del, then its own text, Term.)
+ const rows = (try s.where("Del Term"))[1] - (try s.where("/test.txt"))[1] - 1;
// Drawn mid-pane, a row either way.
const drawn_at = line - try topLine(&s, "/test.txt");
try std.testing.expect(drawn_at + 1 >= rows / 2 and drawn_at <= rows / 2 + 1);
@@ -163,7 +164,7 @@ test "modes: Ctrl-w outlines a pane, h j k l move the outline, and Enter, Esc, :
// `:` gives the outlined pane's tag the keyboard.
try s.keys("\x17l:");
try expectEqual(b, try s.focused());
- try expectEqual((try s.where("/b.txt Save"))[1], (try s.cursor()).?[1]);
+ try expectEqual((try s.where("/b.txt Del"))[1], (try s.cursor()).?[1]);
try s.keys("\x1b");
// A letter goes straight there.
try s.keys("\x17a");
@@ -190,11 +191,11 @@ test "modes: in window mode d deletes the outlined pane, asking k or j between t
try s.write(s.at("/pane/{d}/name", .{mid}), "/mid\n");
try s.write(s.at("/pane/{d}/name", .{low}), "/low\n");
const names = &[_][]const u8{ "/test.txt", "/mid", "/low" };
- const row_top = (try s.where("/test.txt Save"))[1];
- const row_mid = (try s.where("/mid Save"))[1];
- const row_low = (try s.where("/low Save"))[1];
+ const row_top = (try s.where("/test.txt Del"))[1];
+ const row_mid = (try s.where("/mid Del"))[1];
+ const row_low = (try s.where("/low Del"))[1];
// From the bottom pane, the outline up to the middle one.
- const mx, const my = try s.where("/mid Save");
+ const mx, const my = try s.where("/mid Del");
const plain = try s.bg(mx, my);
try s.keys("\x17k");
const lit = try s.bg(mx, my);
@@ -217,7 +218,7 @@ test "modes: in window mode d deletes the outlined pane, asking k or j between t
// j: the pane below takes the rows, and the outline goes with them.
try s.keys("dj");
try std.testing.expect(!try listed(&s, mid));
- try expectEqual(row_top, (try s.where("/test.txt Save"))[1]);
+ try expectEqual(row_top, (try s.where("/test.txt Del"))[1]);
try expectEqual(row_mid, (try s.where("/low "))[1]);
try std.testing.expectEqualStrings("/low", try outlined(&s, lit, &.{ "/test.txt", "/low" }));
// With one neighbour nothing is asked: d closes it, the outline on the
@@ -461,7 +462,7 @@ test "modes: hopping between two panes by Esc, window mode or a click makes no p
try expectEqual(want, try s.focused());
}
const doc_row = (try s.where("row"))[1];
- const shell_row = (try s.where("Term Save Mode"))[1] + 1;
+ const shell_row = (try s.where("Del Term"))[1] + 1;
for (0..8) |_| {
const other = if (try s.focused() == doc) shell else doc;
const row = if (other == doc) doc_row else shell_row;