rust/tests/ui/process/issue-20091.rs
许杰友 Jieyou Xu (Joe) 02c003b50e tests: cleanup tests/ui/process/issue-20091.rs
- Remove already stable feature gate and remove
  `#![allow(stable_features)]`.
- Replace `ignore-*` with `needs-subprocess`.
2025-01-23 20:51:29 +08:00

20 lines
424 B
Rust

//@ run-pass
//@ needs-subprocess
#[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() {}