about summary refs log tree commit diff
path: root/tests/ui/process/process-spawn-nonexistent.rs
blob: 3db670624fb375b81859556ebdd73e1068a2748c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ run-pass
//@ needs-subprocess
//@ 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
    ));
}