summaryrefslogtreecommitdiff
path: root/test/behaviour/look_and_exec.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-03 17:00:11 -0300
committerGabriel Schneider <[email protected]>2026-11-03 17:04:18 -0300
commit37408da299e21b8807ccd10545482a709bac88c7 (patch)
treeff29465e50538df66a712d9aeabf156c9185a1b1 /test/behaviour/look_and_exec.zig
parentd1273bbd99daf9b1855d82bf315db8ede20abde5 (diff)
downloadpardes-37408da299e21b8807ccd10545482a709bac88c7.tar.gz
pardes-37408da299e21b8807ccd10545482a709bac88c7.zip
test: eight of src/pardes.zig's tests through the 9P tree alone (test/behaviour/columns_and_tags, look_and_exec): Joincol folding a column into its right neighbour and refused with none, Newcol's empty column with its tag focused filled by the next Tty, a column's exec acting on that column and a pane's Delcol on its own, a column's last pane closed leaving it empty and Delcol taking it, a column's tag following it through Newcol and Joincol, Delcol on the last column leaving the window typed into, New in no pane's tag nor the workspace's, a look that finds nothing in the log; Session's columns and column (/layout as column:panes); each checked to fail against a break (joinCol inert, joinCol keeping the left tag, acmeColumn ignoring the active column, a scratch ignoring exec_column, no enterHeader for an emptied column, removeColumn refusing the last, New in a file pane's tail, missed logging nothing)
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.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/behaviour/look_and_exec.zig b/test/behaviour/look_and_exec.zig
index 2ff4345b..5b8d7e1a 100644
--- a/test/behaviour/look_and_exec.zig
+++ b/test/behaviour/look_and_exec.zig
@@ -36,3 +36,11 @@ test "look-and-exec: a bare :N or :N:M look addresses the pane itself, from its
try s.write(s.at("/pane/{d}/event", .{n}), "ML0 0 0 2 :1\n");
try expectEqual(.{ @as(u32, 0), @as(u32, 6) }, try s.range(dot));
}
+
+test "look-and-exec: a look that finds nothing says so" {
+ var s = try Session.initFile(std.testing.allocator, "x\n");
+ defer s.deinit();
+ const n = try s.newPane();
+ try s.write(s.at("/pane/{d}/look", .{n}), "/no/such/zzqq\n");
+ try std.testing.expect(std.mem.indexOf(u8, try s.read("/log"), s.at("err {d} look: no match for \"/no/such/zzqq\"\n", .{n})) != null);
+}