TheSven73 / file-objects-rs

Real and fake implementations of file system operations
MIT License
2 stars 1 forks source link

Fix canonicalize_ok_with_dotdot_if_paths_exist on MacOS #8

Closed 2-complex closed 4 years ago

2-complex commented 4 years ago

This test:

canonicalize_ok_with_dotdot_if_paths_exist

works by creating a file at a path in a directory called test, then appending ../test in its path, canonicalizing and comparing that to the original path.

This doesn't work because the directory in which the test is working might not be canonical.

Proposed fix: canonicalize both the original path and the modifed path and compare. Also, check file contents at canonicalized path.

TheSven73 commented 4 years ago

Superseded by #10