2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-02-28 19:09:59 -08:00
|
|
|
// ignore-emscripten no processes
|
2019-04-24 09:26:33 -07:00
|
|
|
// ignore-sgx no processes
|
2022-09-19 21:00:10 +00:00
|
|
|
// ignore-fuchsia ErrorKind not translated
|
2018-02-28 19:09:59 -08:00
|
|
|
|
|
|
|
use std::io::ErrorKind;
|
|
|
|
use std::process::Command;
|
|
|
|
|
|
|
|
fn main() {
|
2022-07-27 13:58:29 +02:00
|
|
|
let result = Command::new("nonexistent").spawn().unwrap_err().kind();
|
|
|
|
|
|
|
|
assert!(matches!(
|
|
|
|
result,
|
|
|
|
// Under WSL with appendWindowsPath=true, this fails with PermissionDenied
|
|
|
|
ErrorKind::NotFound | ErrorKind::PermissionDenied
|
|
|
|
));
|
2018-02-28 19:09:59 -08:00
|
|
|
}
|