rust/src/test/ui/issues/issue-16272.rs

25 lines
473 B
Rust
Raw Normal View History

// run-pass
// ignore-cloudabi no processes
// ignore-emscripten no processes
2019-04-24 11:26:33 -05: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());
}