summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/behaviour/other_files.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/behaviour/other_files.zig b/test/behaviour/other_files.zig
index b19ffa0f..e6c104c3 100644
--- a/test/behaviour/other_files.zig
+++ b/test/behaviour/other_files.zig
@@ -22,6 +22,22 @@ test "other-files: kbdin types at the pane with the keyboard and mousein clicks,
try std.testing.expectError(error.Refused, s.read("/kbdin"));
}
+test "other-files: kbdin's keys are the user's: SPC f f opens Find's picker in the pane's tag where jumps walk, not the +Search a script's Find opens" {
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "a.txt", .data = "a\n" });
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "b.txt", .data = "b\n" });
+ var s = try Session.initFile(std.testing.allocator, "x\n");
+ defer s.deinit();
+ var buf: [4096]u8 = undefined;
+ _ = try s.lookFile(s.at("{s}/a.txt", .{buf[0..try tmp.dir.realPath(std.testing.io, &buf)]}));
+ try s.keys(" ff");
+ try std.testing.expect(std.mem.indexOf(u8, try s.read("/index"), "+Search") == null);
+ // Its rows under the tag of the pane typed at, the cursor on the first.
+ _ = try s.where("▶ a.txt");
+ _ = try s.where(" b.txt");
+}
+
test "other-files: kbdin's Kalt rune is Alt on the key after it alone, and an Alt key types nothing" {
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();