From b5fa0b7e8f7d69dc34e3e832eaf4f56805e78dd2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 17:07:16 -0300 Subject: test: review of the fsb port: the held ctl line (no newline, 20000 bytes, run at the close, its failure in the log) moved to T1 (test/behaviour/limits.zig), the process case dropped from test/process/tree.zig; the 256-byte-frame listing checked name by name (entry-00 to entry-23), not by count and prefix; the daemon cases (a killed tty editor, a signalled session) wait for the daemon before their root is removed on a failure's way out too, which left an empty /tmp/pardes-process-* root; each port checked to fail against a further nine breaks ($winid never exported, the dead-socket sweep skipped, the restore record renamed, Unmount let go with a pane open on the mount, /screen re-rendered on a later read, Find's miss reworded, the socket never unlinked on a signal, a closed open's held line dropped, a body's truncate ignored, a Python block given one Enter); behaviour, process, fs-unit and core tests and the rest of fs.py pass Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/behaviour/limits.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/behaviour/limits.zig') diff --git a/test/behaviour/limits.zig b/test/behaviour/limits.zig index d84d4490..35dde65e 100644 --- a/test/behaviour/limits.zig +++ b/test/behaviour/limits.zig @@ -38,3 +38,14 @@ test "limits: a ctl line over 1 MiB is refused once, EINVAL, and its tail is not // What came after the long line's newline ran. try s.expect(s.at("/pane/{d}/body", .{n}), ""); } + +test "limits: a ctl line with no newline is held whatever its write's size, and runs at the close, its failure in the log" { + var s = try Session.initFile(std.testing.allocator, "x\n"); + defer s.deinit(); + const ctl = try s.hold(s.at("/pane/{d}/ctl", .{try s.focused()}), 1); + const line = "bogus" ++ @as([20000]u8, @splat('x')); + try std.testing.expectEqual(@as(u16, 0), try s.writeFid(ctl, line)); + try std.testing.expect(std.mem.indexOf(u8, try s.read("/log"), "ctl: unknown control message") == null); + s.clunk(ctl); + try std.testing.expect(std.mem.indexOf(u8, try s.read("/log"), "ctl: unknown control message") != null); +} -- cgit v1.3