summaryrefslogtreecommitdiff
path: root/src/ninep/ctl.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-24 14:16:32 -0300
committerGabriel Schneider <[email protected]>2026-10-24 14:26:04 -0300
commitf3b5bd10ceb4c4db7263739770d5e4bdb879ba75 (patch)
tree39cbb04a514650f3453bfb0df3acb291d913f53d /src/ninep/ctl.zig
parent9299281492d63e549ab274034efb59ab4e9d96f6 (diff)
downloadpardes-f3b5bd10ceb4c4db7263739770d5e4bdb879ba75.tar.gz
pardes-f3b5bd10ceb4c4db7263739770d5e4bdb879ba75.zip
Search converge 7/6: a script's Grep or Find that misses opens nothing, a dumped query pane restores as plain text; fs.py's Recent and canary to the query pane
Diffstat (limited to 'src/ninep/ctl.zig')
-rw-r--r--src/ninep/ctl.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index 635e03a6..258ea1ee 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -3069,6 +3069,15 @@ test "a script's Grep and Find fill the pane's one query pane, a row a line unde
var after: usize = 0;
for (p.panes) |slot| after += @intFromBool(slot != null);
try testing.expectEqual(count, after);
+ // With no query pane under it, a miss leaves none: the one it made goes.
+ _ = wr(p, Node.of(found.serial, .ctl), "Del\n");
+ var closed: usize = 0;
+ for (p.panes) |slot| closed += @intFromBool(slot != null);
+ try testing.expectEqual(E.NOENT, wr(p, Node.of(serialOf(p), .exec), "Find zzqqnomatchzz\n").errno());
+ var left: usize = 0;
+ for (p.panes) |slot| left += @intFromBool(slot != null);
+ try testing.expectEqual(closed, left);
+ try testing.expect(panes.Query.ofOwner(p, serialOf(p)) == null);
}
test "Unmount of a name not mounted says no such mount, which a mount reads as ENOENT" {