From 2e4868beb25eb81f7b21a9ad481b5b121c65c4c8 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 3 Nov 2026 17:38:42 -0300 Subject: test: what the review of the ninep migration found the moved tests no longer checked, back through the 9P tree: a stat of /focus, /ctl and /exec says the length a read gives (0 for an empty /focus), an omode-0 open of a pane's ctl cannot lock, and a look at a line past the end logs that it has no such line; each checked to fail against a break (/focus, /ctl and /exec stat 0, a read-only open's lock taken, the past-end line's words changed) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/behaviour/look_and_exec.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/behaviour/look_and_exec.zig') diff --git a/test/behaviour/look_and_exec.zig b/test/behaviour/look_and_exec.zig index f3b94a3f..72052f7d 100644 --- a/test/behaviour/look_and_exec.zig +++ b/test/behaviour/look_and_exec.zig @@ -92,6 +92,7 @@ test "look-and-exec: a look takes acme's :addr and file:addr, and a miss changes try s.write(look, s.at("{s}:99\n", .{path})); try expectEqual(.{ @as(u32, 12), @as(u32, 16) }, try s.range(dot)); try s.expect(look, ""); + try std.testing.expect(has(try s.read("/log"), s.at("look: {s}:99 has no line 99\n", .{path}))); } test "look-and-exec: the root look's file:/re/ goes on from the dot, and a miss leaves the dot as it was" { @@ -116,6 +117,7 @@ test "look-and-exec: exec runs a builtin at the pane, and look and exec read bac try s.write(s.at("/pane/{d}/exec", .{n}), "Msg from exec\n"); try std.testing.expect(has(try s.read("/log"), s.at("msg {d} from exec\n", .{n}))); try s.expect("/exec", own); + try std.testing.expectEqual(@as(u64, own.len), (try s.stat("/exec")).size); try s.expect(s.at("/pane/{d}/look", .{n}), own); try s.write(s.at("/pane/{d}/exec", .{n}), "New\n"); const made = try s.focused(); -- cgit v1.3