rust/src/test/ui/issues/issue-16272.rs
2019-07-27 18:56:16 +03:00

25 lines
473 B
Rust

// run-pass
// ignore-cloudabi no processes
// ignore-emscripten 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());
}