test(compile): portable r3f3 fixture — macOS has no /bin/true

The hostile-metatable half of r3f3 spawned /bin/true, which exists on
Linux but not macOS (true lives at /usr/bin/true there), so the spawn
failed with NotFound and the pcall absorbed it — failing the "raw
reads must not trip a raising __index" assert on both macOS flavors.
Use the suite's /bin/sh -c idiom instead. The r1f6 /bin/true specs
stay: their type errors fire in spec parsing before any exec, and the
asserts pin the message text, so the binary there is inert on every
platform.

Bite re-verified: against pre-fix src/lua_bindings/mod.rs the test
still fails at the pgid assert (metatable-provided group=true
honored), so the fixture change keeps its teeth.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VoiEyuPjoBhvwACf8HAnLB
This commit is contained in:
Levi Neuwirth 2026-07-13 17:31:12 +01:00
parent b76c46603a
commit b5bbce899a
1 changed files with 1 additions and 1 deletions

View File

@ -2069,7 +2069,7 @@ fn r3f3_spec_fields_are_raw_reads_metatables_not_honored() {
&s,
r#"
local spec = setmetatable(
{ label = "mt2", command = "/bin/true" },
{ label = "mt2", command = "/bin/sh", args = { "-c", "exit 0" } },
{ __index = function() error("hostile spec metatable") end })
local ok = pcall(pmacs.process.spawn, spec)
return ok