summary refs log tree commit diff
path: root/tests/ui/process/issue-16272.rs
blob: bf26769d494f656cf1850933f88816c54e6cc89f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//@ run-pass
//@ ignore-wasm32 no processes
//@ ignore-sgx no processes

use std::process::Command;
use std::env;

fn main() {
    let len = env::args().len();

    if len == 1 {
        test();
    } else {
        assert_eq!(len, 3);
    }
}

fn test() {
    let status = Command::new(&env::current_exe().unwrap())
                         .arg("foo").arg("")
                         .status().unwrap();
    assert!(status.success());
}