]> git.lizzy.rs Git - rust.git/blob - src/test/ui/command/command-argv0-debug.rs
Rollup merge of #91312 - terrarier2111:anon-const-ice, r=jackh726
[rust.git] / src / test / ui / command / command-argv0-debug.rs
1 // run-pass
2
3 // ignore-windows - this is a unix-specific test
4 // ignore-emscripten no processes
5 // ignore-sgx no processes
6 use std::os::unix::process::CommandExt;
7 use std::process::Command;
8
9 fn main() {
10     let mut command = Command::new("some-boring-name");
11
12     assert_eq!(format!("{:?}", command), r#""some-boring-name""#);
13
14     command.args(&["1", "2", "3"]);
15
16     assert_eq!(format!("{:?}", command), r#""some-boring-name" "1" "2" "3""#);
17
18     command.arg0("exciting-name");
19
20     assert_eq!(format!("{:?}", command), r#"["some-boring-name"] "exciting-name" "1" "2" "3""#);
21 }