diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 17:07:16 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-04 17:11:04 -0300 |
| commit | b5fa0b7e8f7d69dc34e3e832eaf4f56805e78dd2 (patch) | |
| tree | ec3266b31ad06128f31010ebb13b2008f2a7f145 /test/behaviour | |
| parent | 6bcb18e021a09d51539e628106a594748637ead2 (diff) | |
| download | pardes-b5fa0b7e8f7d69dc34e3e832eaf4f56805e78dd2.tar.gz pardes-b5fa0b7e8f7d69dc34e3e832eaf4f56805e78dd2.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/behaviour')
| -rw-r--r-- | test/behaviour/limits.zig | 11 |
1 files changed, 11 insertions, 0 deletions
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); +} |
