Auto merge of #97176 - kraktus:cmd_debug, r=the8472
More verbose `Debug` implementation of `std::process:Command`
Mainly based on commit: ccc019aabf from https://github.com/zackmdavis
close https://github.com/rust-lang/rust/issues/42200
This commit is contained in:
commit
92c1937a90
5 changed files with 173 additions and 29 deletions
|
|
@ -1,21 +0,0 @@
|
|||
// run-pass
|
||||
|
||||
// ignore-windows - this is a unix-specific test
|
||||
// ignore-emscripten no processes
|
||||
// ignore-sgx no processes
|
||||
use std::os::unix::process::CommandExt;
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
let mut command = Command::new("some-boring-name");
|
||||
|
||||
assert_eq!(format!("{:?}", command), r#""some-boring-name""#);
|
||||
|
||||
command.args(&["1", "2", "3"]);
|
||||
|
||||
assert_eq!(format!("{:?}", command), r#""some-boring-name" "1" "2" "3""#);
|
||||
|
||||
command.arg0("exciting-name");
|
||||
|
||||
assert_eq!(format!("{:?}", command), r#"["some-boring-name"] "exciting-name" "1" "2" "3""#);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue