diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-10 09:58:31 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-11 09:58:59 -0300 |
| commit | eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c (patch) | |
| tree | cc993ad239451adb6f23645ee5ca001802832ed0 /test/e2e_harness.zig | |
| parent | 38e9919a9ea9055538409b388d580c4e4c838434 (diff) | |
| download | pardes-eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c.tar.gz pardes-eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c.zip | |
macos: the AppKit shell, its icon, and the offscreen e2e harness
Diffstat (limited to 'test/e2e_harness.zig')
| -rw-r--r-- | test/e2e_harness.zig | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/e2e_harness.zig b/test/e2e_harness.zig index c188827e..8dac7836 100644 --- a/test/e2e_harness.zig +++ b/test/e2e_harness.zig @@ -183,8 +183,16 @@ pub const Harness = struct { /// input just sent: without it, an app still asleep in its event loop looks /// exactly like an app that has finished. See snapshot.zig's waitStable. pub fn pending(self: *Harness) usize { + // Darwin files FIONREAD under the socket ioctls rather than the + // termios group std.posix.T exposes, and encodes it differently + // besides — _IOR('f', 127, int) against linux's flat constant. + // Neither is derivable from the other, so both are named. + const FIONREAD: c_int = switch (@import("builtin").os.tag) { + .linux => posix.T.FIONREAD, + else => 0x4004667f, + }; var n: c_int = 0; - if (posix.system.ioctl(self.master, posix.T.FIONREAD, @intFromPtr(&n)) != 0) return 0; + if (posix.system.ioctl(self.master, FIONREAD, @intFromPtr(&n)) != 0) return 0; return if (n > 0) @intCast(n) else 0; } |
