summaryrefslogtreecommitdiff
path: root/test/behaviour/keys.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behaviour/keys.zig')
-rw-r--r--test/behaviour/keys.zig24
1 files changed, 0 insertions, 24 deletions
diff --git a/test/behaviour/keys.zig b/test/behaviour/keys.zig
index 476504ce..eeaacf7d 100644
--- a/test/behaviour/keys.zig
+++ b/test/behaviour/keys.zig
@@ -323,30 +323,6 @@ test "keys: SPC j n from the pane a Look gave the keyboard walks back into the c
try std.testing.expect(std.mem.startsWith(u8, try s.read(sel), "Theme "));
}
-test "keys: SPC j n and SPC j p walk on from the place a Look's +Search listing chose, its keyboard left in the file" {
- var tmp = std.testing.tmpDir(.{});
- defer tmp.cleanup();
- try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "look-owner.txt", .data = "alpha target\nbeta target\ngamma target\n" });
- var dir: [4096]u8 = undefined;
- const at = dir[0..try tmp.dir.realPath(std.testing.io, &dir)];
- var s = try Session.initFile(std.testing.allocator, "x\n");
- defer s.deinit();
- try s.write("/ctl", "LookWord list\n"); // the +Search listing is what is walked
- try s.write("/look", s.at("{s}/look-owner.txt\n", .{at}));
- const file = try s.focused();
- try s.write(s.at("/pane/{d}/exec", .{file}), "Look target\n");
- try std.testing.expectEqual(file, try s.focused());
- // The Look took the first; the walk goes on from it, and back.
- try s.keys(" jn");
- const results = try s.focused();
- try std.testing.expect(results != file);
- const sel = s.at("/pane/{d}/sel", .{results});
- try s.expect(sel, "look-owner.txt:2:6-11");
- try s.keys(" jp");
- try std.testing.expectEqual(results, try s.focused());
- try s.expect(sel, "look-owner.txt:1:7-12");
-}
-
/// Screen row `row` as drawn.
fn screenRow(s: *Session, row: usize) ![]const u8 {
var rows = std.mem.splitScalar(u8, try s.screen(), '\n');