From eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 10 Aug 2026 09:58:31 -0300 Subject: macos: the AppKit shell, its icon, and the offscreen e2e harness --- test/macos_e2e.swift | 983 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 983 insertions(+) create mode 100644 test/macos_e2e.swift (limited to 'test/macos_e2e.swift') diff --git a/test/macos_e2e.swift b/test/macos_e2e.swift new file mode 100644 index 00000000..ba0c48f0 --- /dev/null +++ b/test/macos_e2e.swift @@ -0,0 +1,983 @@ +// pardes-macos-e2e: drive the real AppKit shell offscreen with the same kind of +// .snap script the tty backend uses, and diff the captures against goldens. +// +// zig build macos-e2e -Dplatform=macos run every script +// zig build macos-e2e -Dplatform=macos -- --update regenerate goldens +// zig build macos-e2e -Dplatform=macos -- test/macos-snapshots/boot.snap +// +// This is the only test the Swift half has. src/macos.zig's ABI guard proves +// the header and the Zig side agree, and it runs on Linux; nothing there ever +// constructs a PardesView, translates a gesture, or asks CoreText to paint a +// glyph. So the harness links the SHIPPING view — not a stub, and with no test +// hook bolted onto the app — into an offscreen window and calls the same public +// entry points the NSEvent overrides call. What a script exercises is what a +// hand exercises. +// +// The output format is test/snapshot.zig's, deliberately byte-identical in +// shape (`== snap