diff options
Diffstat (limited to 'src/ninep/ctl.zig')
| -rw-r--r-- | src/ninep/ctl.zig | 9 |
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" { |
