rust/tests/ui/process/issue-20091.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
506 B
Rust
Raw Normal View History

//@ run-pass
#![allow(stable_features)]
//@ ignore-wasm32 no processes
2019-04-24 16:26:33 +00:00
//@ ignore-sgx no processes
2018-07-23 02:14:42 +00:00
#![feature(os)]
#[cfg(unix)]
fn main() {
use std::process::Command;
use std::env;
use std::os::unix::prelude::*;
use std::ffi::OsStr;
if env::args().len() == 1 {
assert!(Command::new(&env::current_exe().unwrap())
.arg(<OsStr as OsStrExt>::from_bytes(b"\xff"))
.status().unwrap().success())
}
}
#[cfg(windows)]
fn main() {}