2018-08-30 12:18:55 +00:00
|
|
|
//@ run-pass
|
2017-10-18 01:45:42 +00:00
|
|
|
//@ ignore-emscripten no processes
|
2019-04-24 16:26:33 +00:00
|
|
|
//@ ignore-sgx no processes
|
2015-03-18 07:57:29 +00:00
|
|
|
|
2015-02-23 18:59:17 +00:00
|
|
|
use std::process::Command;
|
2015-02-16 14:04:02 +00:00
|
|
|
use std::env;
|
2014-08-05 18:49:34 +00:00
|
|
|
|
|
|
|
fn main() {
|
2015-02-16 14:04:02 +00:00
|
|
|
let len = env::args().len();
|
2014-08-05 18:49:34 +00:00
|
|
|
|
|
|
|
if len == 1 {
|
|
|
|
test();
|
|
|
|
} else {
|
|
|
|
assert_eq!(len, 3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn test() {
|
2015-02-23 18:59:17 +00:00
|
|
|
let status = Command::new(&env::current_exe().unwrap())
|
2014-08-05 18:49:34 +00:00
|
|
|
.arg("foo").arg("")
|
|
|
|
.status().unwrap();
|
|
|
|
assert!(status.success());
|
|
|
|
}
|