diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-09 00:52:52 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-09 01:28:28 -0300 |
| commit | 5157579ff7f9ae0cfc3c7629e953da05bce340fc (patch) | |
| tree | 02147789efdcea998981efcfe05d4bcb3e9bb7b0 /src/Handover.zig | |
| parent | 4c4b9bf54d77dbc0f9f4e2619746908e501c6001 (diff) | |
| download | pardes-5157579ff7f9ae0cfc3c7629e953da05bce340fc.tar.gz pardes-5157579ff7f9ae0cfc3c7629e953da05bce340fc.zip | |
tests: at the end of their files: every top-level test block of the 46 files that had one mid-file (the locality analysis's 45 and test/hxdiff.zig; gui.zig, macos.zig, look, host_io, 9p_io, terminal, tui, mouse, fs, replica, layout among them, 11,429 test lines), with the functions only tests call, moved after the file's code in their order, a mechanical move (.scratch/suites/tests_to_end.py), zig fmt'd; the unit suites pass as before (tui 1486/1487, gui 1536/1537, core 956/956 on both), macos.zig only parse-checked here
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Handover.zig')
| -rw-r--r-- | src/Handover.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Handover.zig b/src/Handover.zig index 1b4fed7d..cf672ba4 100644 --- a/src/Handover.zig +++ b/src/Handover.zig @@ -415,7 +415,7 @@ fn carry(io: std.Io, job: *Job) void { const entry = std.fmt.bufPrint(&entry_buf, "{s}/9p/pardes/{d}", .{ run, pid }) catch unreachable; // under sun_path, checked above var waited: u32 = 0; while (waited < 15_000) : (waited += 50) { - if (libc.kill(pid, @enumFromInt(0)) != 0) + if (libc.kill(pid, @fromBackingInt(@intCast(0))) != 0) return job.post(job.post_ctx, job.seq, false, "the new window ended before it was up"); if (ninep_io.Client.readLimit(job.gpa, entry, "status", "status", 256)) |status| { job.gpa.free(status); @@ -506,6 +506,8 @@ fn spawnWindow(job: *Job) !libc.pid_t { // ---- tests ---- +extern "c" fn setenv(name: [*:0]const u8, value: [*:0]const u8, overwrite: c_int) c_int; + /// Two text panes in one column, the lower one `/test.txt`'s twin made by /// New, and the grip of pane `id` let go past the window's edge. fn twoPanes(gpa: std.mem.Allocator) !*Pardes { @@ -658,8 +660,6 @@ test "a column let go over another window goes beside the column the pointer is try std.testing.expect(from.view().ncol == 1 or from.view().cols[c].n == 0 or layout.findPane(from, 0) == null); } -extern "c" fn setenv(name: [*:0]const u8, value: [*:0]const u8, overwrite: c_int) c_int; - test "a handover under a runtime directory too long for a window's socket is refused in words, no window made" { if (comptime builtin.os.tag != .linux) return error.SkipZigTest; const gpa = std.testing.allocator; |
