diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-26 19:48:46 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-26 20:06:45 -0300 |
| commit | 8d2a064eb69a1f888c435c3a0e03468b59abbb0d (patch) | |
| tree | b9a62ca4b5653864d03c1f648e72d1667b40c118 /test/behaviour | |
| parent | a88ea865f116469689c62454facde811bdb37ce6 (diff) | |
| download | pardes-8d2a064eb69a1f888c435c3a0e03468b59abbb0d.tar.gz pardes-8d2a064eb69a1f888c435c3a0e03468b59abbb0d.zip | |
Pick: Find and Grep search from the asking pane's directory again, as a command runs in its window's directory in acme, taking back W8's work-tree root (rqouyxqp 89f51118eb24): the user's ruling of 2026-11-26 ("File folder, i didn't like the other rules btw that changed acme semantic for this"); the leading directory that narrows a Grep (SPEC §5.1, "scoped to a directory if the query starts with one") is kept, read against the pane's directory (`sub needle` from the top of a tree searches sub/); THE CHANGE: Pick.open sets every source's directory to the asking pane's (Pardes.paneDir), as before W8; Pick.workTree, no longer called, is kept for the explicit root keys the user chose next (the coordinator's item 5: SPC f F, SPC f G, a `:` twin); grepScope's and take's words say the picker's directory, not the root; replica.zig's may_wait loses W8's `Find *` and `Grep *` rows (the root's stat; a Grep's leading directory still stats, but shell-test's far-client walk, replica.zig's may_wait check, calls the Grep row stale: no walked word stops there, as before W8); the `.git` the tests made "a work tree of its own: Find searches it, not the one the test runs in" goes (Pick.testFile, Jump.zig, TagState.walkedReader, replica.zig's plain-kind test, behaviour/addons.zig x4, addons_pdf.zig, other_files.zig, language_servers.zig): Find and Grep there list the test's own directory again; the docs (guide.typ's Find and Grep rows, builtins-*.json, the Help index) said "below this pane's directory" all along: no text to bring back; no dump, digest, frame or hot path touched (a picker's open: a stat per directory up to / fewer); RUN (TEST FIRST): Pick.zig's W8 test re-pinned, "Find and Grep search from the asking pane's directory ...": a tree with `.git` at its top, Find from src/deep/x.txt lists src/deep alone (one row, its directory the pane's), from the top three rows and `sub/name` one, Grep `needle` two hits and `sub needle` one, `sub/name.txt:1 needle one`, its place the top's sub/name.txt: fails on yuwytntu a88ea865f116 at Pick.zig:3768 (the directory the root), passes now; GOLDENS: process-test's find (test/snapshots/find.golden) re-recorded with --update: from sub/ZQMARK-beta.txt `SPC f f` lists sub/'s files, not the root's five, so the band is two rows shorter in its three picker snaps (`bod`, cancel, topbar), nothing else moved; GATES (Debug tui): core-test 1165/1342 (177 skipped; the importer's 7 cached), process-test find (PASS after --update; before it the GoldenMismatch above), behaviour-test 290/290 (its T1 runner 800 clean quits), shell-test 1390/1393 (3 skipped; the base's 1388/1391 and this line's two new tests); load 1.3 to 3.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'test/behaviour')
| -rw-r--r-- | test/behaviour/addons.zig | 8 | ||||
| -rw-r--r-- | test/behaviour/addons_pdf.zig | 2 | ||||
| -rw-r--r-- | test/behaviour/language_servers.zig | 2 | ||||
| -rw-r--r-- | test/behaviour/other_files.zig | 2 |
4 files changed, 0 insertions, 14 deletions
diff --git a/test/behaviour/addons.zig b/test/behaviour/addons.zig index 88c477ea..46c8e012 100644 --- a/test/behaviour/addons.zig +++ b/test/behaviour/addons.zig @@ -381,8 +381,6 @@ fn dirOf(s: *Session, tmp: *std.testing.TmpDir) ![]const u8 { test "addons: a picker shows a file of an addon's kind through its kind in the pane it lands in, Esc puts that pane back as it was, and Enter lands as a Look does" { var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); - // A work tree of its own: Find searches it, not the one the test runs in. - try tmp.dir.createDir(std.testing.io, ".git", .default_dir); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "notes.txt", .data = "the notes\n" }); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "seven.fake", .data = "1234567" }); var s = try Session.initFile(std.testing.allocator, "x\n"); @@ -425,8 +423,6 @@ test "addons: a picker shows a file of an addon's kind through its kind in the p test "addons: a picker's row of a file no kind takes and not text shows one line naming it, and the row before's file never stays in the body" { var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); - // A work tree of its own: Find searches it, not the one the test runs in. - try tmp.dir.createDir(std.testing.io, ".git", .default_dir); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "notes.txt", .data = "the notes\n" }); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "other.txt", .data = "other text\n" }); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "seven.fake", .data = "1234567" }); @@ -468,8 +464,6 @@ test "addons: a picker's row of a file no kind takes and not text shows one line test "addons: moving the cursor over pictures in a picker draws only the one it rests on, and a draw of one passed by is dropped whenever it comes back" { var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); - // A work tree of its own: Find searches it, not the one the test runs in. - try tmp.dir.createDir(std.testing.io, ".git", .default_dir); const png = "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x02\x00\x00\x00\x90wS\xde\x00\x00\x00\x0cIDATx\x9cc\xf8\xcf\xc0\x00\x00\x03\x01\x01\x00\xc9\xfe\x92\xef\x00\x00\x00\x00IEND\xaeB`\x82"; try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "notes.txt", .data = "the notes\n" }); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "pic1.png", .data = png }); @@ -507,8 +501,6 @@ test "addons: moving the cursor over pictures in a picker draws only the one it test "addons: Enter on a picture in a picker opens its kind's pane, never its bytes as text in the reading pane (the user's report)" { var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); - // A work tree of its own: Find searches it, not the one the test runs in. - try tmp.dir.createDir(std.testing.io, ".git", .default_dir); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "notes.txt", .data = "the notes\n" }); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "pic.ppm", .data = "P6\n2 1\n255\n\x0d\x4d\xe7\x0d\x4d\xe7" }); var s = try Session.initFile(std.testing.allocator, "x\n"); diff --git a/test/behaviour/addons_pdf.zig b/test/behaviour/addons_pdf.zig index c59b4a93..918d1842 100644 --- a/test/behaviour/addons_pdf.zig +++ b/test/behaviour/addons_pdf.zig @@ -307,8 +307,6 @@ test "addons: a PDF under a picker's cursor shows through the pdf addon in the p try s.loadPdf(); var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); - // A work tree of its own: Find searches it, not the one the test runs in. - try tmp.dir.createDir(std.testing.io, ".git", .default_dir); const pdf = try std.Io.Dir.cwd().readFileAlloc(std.testing.io, "docs/design.pdf", s.arena.allocator(), .limited(4 << 20)); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "paper.pdf", .data = pdf }); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "notes.txt", .data = "the notes\n" }); diff --git a/test/behaviour/language_servers.zig b/test/behaviour/language_servers.zig index 7f1eef73..3b786ec4 100644 --- a/test/behaviour/language_servers.zig +++ b/test/behaviour/language_servers.zig @@ -386,8 +386,6 @@ test "language-servers: a file of a server's language opened in a pane starts th const io = std.testing.io; var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); - // A work tree of its own: Find searches it, not the one the test runs in. - try tmp.dir.createDir(io, ".git", .default_dir); try tmp.dir.writeFile(io, .{ .sub_path = "a.zig", .data = "const a = 1;\n" }); try tmp.dir.writeFile(io, .{ .sub_path = "b.zig", .data = "const b = 2;\n" }); try tmp.dir.writeFile(io, .{ .sub_path = "c.py", .data = "c = 3\n" }); diff --git a/test/behaviour/other_files.zig b/test/behaviour/other_files.zig index 95d4de6d..f1bd2ce0 100644 --- a/test/behaviour/other_files.zig +++ b/test/behaviour/other_files.zig @@ -25,8 +25,6 @@ test "other-files: kbdin types at the pane with the keyboard and mousein clicks, test "other-files: kbdin's keys are the user's: SPC f f opens Find's picker in the pane's tag where jumps walk, not the +Search a script's Find opens" { var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); - // A work tree of its own: Find searches it, not the one the test runs in. - try tmp.dir.createDir(std.testing.io, ".git", .default_dir); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "a.txt", .data = "a\n" }); try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "b.txt", .data = "b\n" }); var s = try Session.initFile(std.testing.allocator, "x\n"); |
