fix(test): resolve target path in symlink test for macOS

On macOS, /var is a symlink to /private/var, so EvalSymlinks returns
the canonical path. The test needs to resolve the expected target path
before comparison.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-20 18:02:41 -08:00
parent c7615e4075
commit 4f504bdff8
2 changed files with 8 additions and 2 deletions

View File

@@ -212,8 +212,10 @@ func TestResolveForWrite(t *testing.T) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if got != target {
t.Errorf("got %q, want %q", got, target)
// Resolve target too - on macOS, /var is symlink to /private/var
wantTarget, _ := filepath.EvalSymlinks(target)
if got != wantTarget {
t.Errorf("got %q, want %q", got, wantTarget)
}
})