make test_temp_path_resolve_existing_cwd() work with symlink in TMPDIR
Here's a simple way to reproduce a test failure before this commit:
```
ln -s /tmp /tmp/here
TMPDIR=/tmp/here cargo test
```
That fails something like this:
```
test test_temp_path_resolve_existing_cwd ... FAILED
failures:
---- test_temp_path_resolve_existing_cwd stdout ----
thread 'test_temp_path_resolve_existing_cwd' (137617) panicked at tests/namedtempfile.rs:376:5:
assertion `left == right` failed
left: "/tmp/.tmpDu1A7l/foo"
right: "/tmp/here/.tmpDu1A7l/foo"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
This commit fixes it by canonicalizing the CWD path in the test.
合并状态:未合并 关闭于 2026-05-07 2 条评论