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