std fs tests: avoid matching on OS-provided error string#156387
std fs tests: avoid matching on OS-provided error string#156387RalfJung wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
|
| } | ||
|
|
||
| #[test] | ||
| #[cfg(windows)] |
There was a problem hiding this comment.
I don't know why this test was made Windows-only, but if we check the ErrorKind it also works on my Linux machine.
There was a problem hiding this comment.
The test was added to ensure the new Windows fs::rename implementation worked as intended. Still, there should be no issue making it a cross-platform test. The only risk would be if there's a platform with odd behaviour here.
There was a problem hiding this comment.
I found one more test which also seems to work fine on Linux, so I enabled that one too. Always nice when things are consistent across targets. :)
|
@bors try jobs=x86_64-msvc-*,test-various,aarch64-apple |
This comment has been minimized.
This comment has been minimized.
std fs tests: avoid matching on OS-provided error string try-job: x86_64-msvc-* try-job: test-various try-job: aarch64-apple
|
@bors try jobs=x86_64-msvc-*,test-various,aarch64-apple |
This comment has been minimized.
This comment has been minimized.
std fs tests: avoid matching on OS-provided error string try-job: x86_64-msvc-* try-job: test-various try-job: aarch64-apple
|
Thanks! @bors r+ |
std fs tests: avoid matching on OS-provided error string These tests are [ancient](rust-lang@6bfbad9). No idea why there written in this style back then, but today we'd clearly check the `ErrorKind`, not the string. r? @ChrisDenton
These tests are ancient. No idea why there written in this style back then, but today we'd clearly check the
ErrorKind, not the string.r? @ChrisDenton