canonicalize temp paths in daemon/cli tests for macOS

Two tests compared a raw Directory.systemTemp path against an OS-resolved
one, which diverge on macOS where /tmp is a symlink to /private/tmp:
FilesService.atCwd resolves the CWD, and the clide-cli e2e server must hash
the same canonical workspace the C client sees via getcwd. Resolve symlinks
on both sides.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jeroen Schweitzer
2026-06-03 10:00:29 +02:00
co-authored by Claude Opus 4.8
parent da4bc267cb
commit 16583343cb
2 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -231,7 +231,9 @@ void main() {
Directory.current = nested;
final svc = FilesService.atCwd(events: RecordingEventSink());
// No .git anywhere on the walk → root falls back to CWD.
expect(svc.root.absolute.path, nested.absolute.path);
// Compare canonical paths: on macOS the CWD resolves through the
// /tmp → /private/tmp symlink, so the raw createTemp path differs.
expect(svc.root.resolveSymbolicLinksSync(), nested.resolveSymbolicLinksSync());
await svc.shutdown();
} finally {
Directory.current = saved;