summaryrefslogtreecommitdiff
path: root/test/behaviour/other_files.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behaviour/other_files.zig')
-rw-r--r--test/behaviour/other_files.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/behaviour/other_files.zig b/test/behaviour/other_files.zig
index bd8cbccd..b19ffa0f 100644
--- a/test/behaviour/other_files.zig
+++ b/test/behaviour/other_files.zig
@@ -124,6 +124,8 @@ test "other-files: a Jumplist entry is (closed) only while no pane has its file
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "b.txt", .data = "two\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
try s.write("/look", s.at("{s}/a.txt\n", .{dir}));
const a = try s.focused();
@@ -157,6 +159,8 @@ test "other-files: a closed file is found again: Recent and /recent list it clos
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "b.txt", .data = "bee\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
const a = s.at("{s}/a.txt", .{dir});
// Opened, its dot on line 3, then closed.
@@ -224,6 +228,8 @@ test "other-files: Back and Forward over a closed file's entries: one reopen is
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "c.txt", .data = "sea\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
try s.write("/look", s.at("{s}/b.txt\n", .{dir}));
const b = try s.focused();
@@ -285,6 +291,8 @@ test "other-files: Back over a closed file deleted since skips it, says so, and
for ([_][]const u8{ "a.txt", "gone.txt", "c.txt" }) |name| try tmp.dir.writeFile(std.testing.io, .{ .sub_path = name, .data = "text\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
try s.write("/look", s.at("{s}/a.txt\n", .{dir}));
const a = try s.focused();
@@ -306,6 +314,8 @@ test "other-files: a remembered place is clamped to the file as it is now, its s
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "c.txt", .data = "one\ntwo\nthree\nfour\nfive\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
try s.write("/look", s.at("{s}/c.txt:2\n", .{dir}));
const c = try s.focused();