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.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/behaviour/modes.zig b/test/behaviour/modes.zig
index b1641c6f..6e07e1b4 100644
--- a/test/behaviour/modes.zig
+++ b/test/behaviour/modes.zig
@@ -204,7 +204,9 @@ test "modes: in window mode d deletes the outlined pane, asking k or j between t
try expectEqual(row_low, (try s.where("/low Save"))[1]);
// d between two panes asks, as SPC d does; Esc takes it back, the
// outline where it was.
- try s.keys("d\x1b");
+ try s.keys("d");
+ try std.testing.expect(std.mem.indexOf(u8, try s.read("/log"), s.at("ask {d} del k j\n", .{mid})) != null);
+ try s.keys("\x1b");
try std.testing.expect(try listed(&s, mid));
try std.testing.expectEqualStrings("/mid", try outlined(&s, lit, names));
// j: the pane below takes the rows, and the outline goes with them.
@@ -217,6 +219,7 @@ test "modes: in window mode d deletes the outlined pane, asking k or j between t
// pane that grew.
try s.keys("d");
try std.testing.expect(!try listed(&s, low));
+ try std.testing.expect(std.mem.indexOf(u8, try s.read("/log"), s.at("ask {d} ", .{low})) == null);
try std.testing.expectEqualStrings("/test.txt", try outlined(&s, lit, &.{"/test.txt"}));
// Enter leaves the mode on it.
try s.keys("\n");
@@ -238,7 +241,10 @@ test "modes: window keys walk from a pane up through its column's tag and the wo
const x0, const y0 = (try s.cursor()).?;
try expectEqual(@as(usize, 1), y0);
try std.testing.expect(x0 < right);
+ const tag = s.at("/col/{d}/tag", .{try s.column(0)});
+ const words = try s.read(tag);
try s.keys("w");
+ try s.expect(tag, words);
const remembered = (try s.cursor()).?;
try std.testing.expect(remembered[0] > x0);
// Across to the right column's tag, and back to where the caret was.