test(sync): compare the resolved extras path on macOS

TestSyncExtras_ProjectJSONReportsResolvedPath failed on the macOS CI
runner: the CLI reports the real target path, and the macOS temp dir
sits behind the /var -> /private/var symlink, so it no longer matched
the unresolved path the test built. Resolve the expected path the same
way, as json_output_test.go already does.
This commit is contained in:
Willie
2026-09-30 04:01:05 +08:00
parent 7b60645397
commit a040eacf83
+2 -1
View File
@@ -1025,7 +1025,8 @@ extras:
result := sb.RunCLIInDir(projectRoot, "sync", "extras", "-p", "--json")
result.AssertSuccess(t)
want := filepath.Join(projectRoot, ".claude", "rules")
// The CLI reports the real path; on macOS the temp dir sits behind /var -> /private/var.
want, _ := filepath.EvalSymlinks(filepath.Join(projectRoot, ".claude", "rules"))
if got := syncExtrasJSONTargets(t, result.Stdout)[0]["path"]; got != want {
t.Errorf("path = %v, want %q", got, want)
}