Closed mheiber closed 2 years ago
It looks like it passes the path to PathBuf::from
which on windows accepts both \
and /
as path separator just like windows itself. What is the exact problem you have?
It looks like it passes the path to
PathBuf::from
which on windows accepts both\
and/
as path separator just like windows itself. What is the exact problem you have?
Thanks, this resolves my issue.
I didn't know whether Pathbuf::from
on Windows worked with /
and StackOverflow didn't seem to know either: https://stackoverflow.com/questions/70993253/are-forward-slashes-in-pathbuffromdir1-dir2-dir3-cross-platform-ok?noredirect=1#comment125520070_70993253. Thanks for teaching me both expect-test and the standard library!
afact, the expect_file! macro only works with hard-code "/" paths.
Is this the case? If so, would you accept a diff for providing a platform-agnostic API?