summaryrefslogtreecommitdiff
path: root/test/behaviour/look_and_exec.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behaviour/look_and_exec.zig')
-rw-r--r--test/behaviour/look_and_exec.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/behaviour/look_and_exec.zig b/test/behaviour/look_and_exec.zig
index 1bc4f040..a7de93cd 100644
--- a/test/behaviour/look_and_exec.zig
+++ b/test/behaviour/look_and_exec.zig
@@ -448,6 +448,8 @@ test "look-and-exec: a look opens spaced paths and locations without editing the
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "two words.zig", .data = "first\nsecond\nthird\n" });
var s = try Session.initFile(std.testing.allocator, "source stays intact\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 path = s.at("{s}/two words.zig", .{try tmpPath(&s, &tmp)});
const source = try s.focused();
const ctl = try s.read(s.at("/pane/{d}/ctl", .{source}));
@@ -478,6 +480,8 @@ test "look-and-exec: a look opens spaced paths and locations without editing the
test "look-and-exec: a look validates the whole batch before opening virtual files" {
var s = try Session.initFile(std.testing.allocator, "source\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 source = try s.focused();
const look = s.at("/pane/{d}/look", .{source});
const index = try s.read("/index");
@@ -596,6 +600,8 @@ test "look-and-exec: a look line's trailing colon is dropped, and a look whose a
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "a.txt", .data = "one\ntwo\nthree\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 before = lines(try s.read("/index"));
// Failing addresses: nothing opened, the write still answered.
@@ -617,6 +623,8 @@ test "look-and-exec: a look that misses file:/re/ names the file, and is logged
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "f.txt", .data = "alpha\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 first = try s.focused();
try s.write("/look", s.at("{s}/f.txt\n", .{dir}));
@@ -631,6 +639,8 @@ test "look-and-exec: a look that goes to another pane leaves the looking pane's
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "f.txt", .data = "f one\nf two\n" });
var s = try Session.initFile(std.testing.allocator, "alpha bravo\ncharlie\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 source = try s.focused();
const other = try s.newPane();