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.zig14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/behaviour/other_files.zig b/test/behaviour/other_files.zig
index ae4c2928..bd8cbccd 100644
--- a/test/behaviour/other_files.zig
+++ b/test/behaviour/other_files.zig
@@ -150,7 +150,7 @@ test "other-files: Recent's row for a file still open is where its dot is now, n
try std.testing.expect(has(rows, "\na.txt:2:3 open\n"));
}
-test "other-files: a closed file is found again: Recent and /recent list it closed, a look at its row reopens it at its dot, and a jump back does too" {
+test "other-files: a closed file is found again: Recent and /recent list it closed, a look at its row reopens it at its dot, and a jump to it does too" {
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "a.txt", .data = "one\ntwo\nthree\n" });
@@ -181,13 +181,11 @@ test "other-files: a closed file is found again: Recent and /recent list it clos
// to it opens it again.
try s.write(s.at("/pane/{d}/ctl", .{back}), "Del\n");
try std.testing.expect(has(try listing(&s, "Jumplist"), "(closed)"));
- // Every entry in order (JumpScope all): which file has the focus after
- // a Del is the layout's to choose, and Back keeps to it first.
- try s.write("/ctl", "JumpScope all\n");
- for (0..8) |_| {
- if ((try named(&s, "/a.txt")).len > 0) break;
- try s.write("/exec", "Back\n");
- }
+ // The text pane closed too, the keyboard is the +Jumps listing's,
+ // which has no file to keep to: Back takes the nearest place, the
+ // closed a.txt's.
+ try s.write(s.at("/pane/{d}/ctl", .{(try named(&s, "/test.txt"))[0]}), "Del\n");
+ try s.write("/exec", "Back\n");
try s.expect(s.at("/pane/{d}/name", .{try s.focused()}), s.at("{s}\n", .{a}));
}