diff options
Diffstat (limited to 'test/behaviour/look_and_exec.zig')
| -rw-r--r-- | test/behaviour/look_and_exec.zig | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/test/behaviour/look_and_exec.zig b/test/behaviour/look_and_exec.zig index ee9554cc..e88a0053 100644 --- a/test/behaviour/look_and_exec.zig +++ b/test/behaviour/look_and_exec.zig @@ -593,7 +593,7 @@ test "look-and-exec: a look that goes to another pane leaves the looking pane's } } -test "look-and-exec: a looked word is found in its own pane, next place after the dot, wrapping, and opens no pane; LookWord list lists it in +Search" { +test "look-and-exec: a looked word is found in its own pane, next place after the dot, wrapping, and opens no pane" { var s = try Session.initFile(std.testing.allocator, "foo x foo y\n"); defer s.deinit(); const n = try s.focused(); @@ -604,31 +604,6 @@ test "look-and-exec: a looked word is found in its own pane, next place after th try expectEqual(.{ at, at + 3 }, try s.range(s.at("/pane/{d}/dot", .{n}))); } try s.expect("/index", index); - try s.write("/ctl", "LookWord list\n"); - try s.write(look, "foo\n"); - try std.testing.expect(lines(try s.read("/index")) > lines(index)); - // ...and look reads back that +Search pane, where the places are. - const search = try paneNamed(&s, "/+Search"); - try std.testing.expect(has(try s.read(look), s.at("{d}\n", .{search}))); -} - -test "look-and-exec: a second LookWord list look in a directory refills its +Search rather than stacking another" { - var tmp = std.testing.tmpDir(.{}); - defer tmp.cleanup(); - try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "words.txt", .data = "alpha beta\nalpha beta\n" }); - var s = try Session.initFile(std.testing.allocator, "x\n"); - defer s.deinit(); - const n = try s.focused(); - try s.write(s.at("/pane/{d}/name", .{n}), s.at("{s}/words.txt\n", .{try tmpPath(&s, &tmp)})); - try s.write(s.at("/pane/{d}/exec", .{n}), "Get\n"); - try s.write("/ctl", "LookWord list\n"); - try s.write(s.at("/pane/{d}/look", .{n}), "alpha\n"); - const first = try paneNamed(&s, "/+Search"); - try s.write(s.at("/pane/{d}/look", .{n}), "beta\n"); - try expectEqual(@as(usize, 1), std.mem.count(u8, try s.read("/index"), "/+Search ")); - try expectEqual(first, try paneNamed(&s, "/+Search")); - // Refilled with beta's places (columns 7-10), not alpha's. - try std.testing.expect(has(try s.read(s.at("/pane/{d}/body", .{first})), "words.txt:1:7-10\n")); } test "look-and-exec: `@pN:` looks at pane N as `a.txt:` looks at a.txt, and a line past the end is said one way, `:N` or `file:N`" { |
