rust/tests/ui/process/issue-16272.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
440 B
Rust
Raw Normal View History

//@ run-pass
//@ ignore-wasm32 no processes
2019-04-24 16:26:33 +00:00
//@ 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());
}