2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
2025-01-23 16:02:41 +08:00
|
|
|
//@ needs-subprocess
|
2015-03-18 16:57:29 +09:00
|
|
|
|
2015-02-23 10:59:17 -08:00
|
|
|
#[cfg(unix)]
|
2014-12-20 23:21:27 -08:00
|
|
|
fn main() {
|
2015-02-23 10:59:17 -08:00
|
|
|
use std::process::Command;
|
|
|
|
|
use std::env;
|
|
|
|
|
use std::os::unix::prelude::*;
|
|
|
|
|
use std::ffi::OsStr;
|
|
|
|
|
|
2015-02-16 16:04:02 +02:00
|
|
|
if env::args().len() == 1 {
|
2015-02-23 10:59:17 -08:00
|
|
|
assert!(Command::new(&env::current_exe().unwrap())
|
|
|
|
|
.arg(<OsStr as OsStrExt>::from_bytes(b"\xff"))
|
2014-12-20 23:21:27 -08:00
|
|
|
.status().unwrap().success())
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-02-23 10:59:17 -08:00
|
|
|
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
|
fn main() {}
|