mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
18 lines
445 B
Rust
18 lines
445 B
Rust
// run-pass
|
|
// ignore-emscripten no processes
|
|
// ignore-sgx no processes
|
|
// ignore-fuchsia ErrorKind not translated
|
|
|
|
use std::io::ErrorKind;
|
|
use std::process::Command;
|
|
|
|
fn main() {
|
|
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
|
|
));
|
|
}
|