diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 00:08:16 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 00:32:56 -0300 |
| commit | 2367ed34beccf3f2f1b8bbf6b8a171f50933d7a1 (patch) | |
| tree | 8dcc7111d1e78806c6ac0e0bd1493c25d86bfc85 /test/behaviour/look_and_exec.zig | |
| parent | 43a4c24e607a456d7a23eb8a779bce5651f18222 (diff) | |
| download | pardes-2367ed34beccf3f2f1b8bbf6b8a171f50933d7a1.tar.gz pardes-2367ed34beccf3f2f1b8bbf6b8a171f50933d7a1.zip | |
config, exec, look: Placement, BootShell, LookWord, DirLook and DiffLook go, with what each kept of pardes before it took acme's ways (exec's pardesPlace, atFoot, belowParent, pardesDoc and evictLonePristineTty with mouse.zig's call, layout's splitParent and columnFitsHalves that only they called, look's ls in a terminal for a directory, the word and patch looks' other branches, the SPC c p key, their Help and builtins-JSON rows, their lines in docs/typ and a changelog line), and the tests of them: Dir.zig's "DirLook terminal: a look at a directory opens a terminal there, no pane listing it", pardes.zig's "first document fallback splits like Term from the originating pane", "first document keeps its originating shell and only opens a column when it fits", "BootShell keep leaves the untouched boot shell a dragged document joins; replace closes it" and "a Look on a directory does not type ls into an occupied terminal", keys.zig's "keys: SPC j n and SPC j p walk on from the place a Look's +Search listing chose, its keyboard left in the file", look_and_exec.zig's "look-and-exec: a second LookWord list look in a directory refills its +Search rather than stacking another", placement.zig's "placement: Placement pardes puts a new pane right under the asking one, and bare it steps back to acme", output.zig's "LookNext/LookPrev keeps the result output a Look chose through a no-match answer, and a stale serial once it is deleted", and the snapshot scripts that turned them on (cmdword, doccol, look-dir, lookpanes, rsearch, splitparent, ttylook); the Del question's test makes its middle panes the acme way, a New at the column's foot, and the others that turned one on for their layout run without it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
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`" { |
