]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-20091.rs
Rollup merge of #61965 - phil-opp:patch-4, r=scottmcm
[rust.git] / src / test / ui / issues / issue-20091.rs
1 // build-pass (FIXME(62277): could be check-pass?)
2 #![allow(stable_features)]
3
4 // ignore-cloudabi no processes
5 // ignore-emscripten no processes
6 // ignore-sgx no processes
7
8 #![feature(os)]
9
10 #[cfg(unix)]
11 fn main() {
12     use std::process::Command;
13     use std::env;
14     use std::os::unix::prelude::*;
15     use std::ffi::OsStr;
16
17     if env::args().len() == 1 {
18         assert!(Command::new(&env::current_exe().unwrap())
19                         .arg(<OsStr as OsStrExt>::from_bytes(b"\xff"))
20                         .status().unwrap().success())
21     }
22 }
23
24 #[cfg(windows)]
25 fn main() {}