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:
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user