From a2554c404c606cddb83509b8a50f5eeb61c307aa Mon Sep 17 00:00:00 2001 From: Aavirash Date: Fri, 9 Oct 2026 17:47:23 +0200 Subject: [PATCH] Tests: the CLI render-out test compares canonical temp paths macOS's /var is a symlink to /private/var: the CLI resolves its working directory through current_dir(), which is canonical, so the recorded output path was /private/var/... while the test expected /var/.... Canonicalise the test's temp directory so the comparison holds on macOS. --- apps/effectcraft-cli/tests/cli.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/effectcraft-cli/tests/cli.rs b/apps/effectcraft-cli/tests/cli.rs index 723016a8..d67e768c 100644 --- a/apps/effectcraft-cli/tests/cli.rs +++ b/apps/effectcraft-cli/tests/cli.rs @@ -28,7 +28,9 @@ fn ok_json(args: &[&str]) -> Value { fn tmp(name: &str) -> PathBuf { let d = std::env::temp_dir().join(format!("ec-cli-test-{}", std::process::id())); std::fs::create_dir_all(&d).unwrap(); - d.join(name) + // macOS's `/var` is a symlink to `/private/var`: a child process resolves its working + // directory through `current_dir()`, which is canonical, so compare canonical paths. + std::fs::canonicalize(&d).unwrap_or(d).join(name) } #[test]