2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-02-28 21:09:59 -06:00
|
|
|
// ignore-emscripten no processes
|
2019-04-24 11:26:33 -05:00
|
|
|
// ignore-sgx no processes
|
2022-09-19 16:00:10 -05:00
|
|
|
// ignore-fuchsia ErrorKind not translated
|
2018-02-28 21:09:59 -06:00
|
|
|
|
|
|
|
use std::io::ErrorKind;
|
|
|
|
use std::process::Command;
|
|
|
|
|
|
|
|
fn main() {
|
2022-07-27 06:58:29 -05: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 21:09:59 -06:00
|
|
|
}
|