about summary refs log tree commit diff
path: root/src/test/ui/command/command-argv0-debug.rs
diff options
context:
space:
mode:
authorkraktus <kraktus@users.noreply.github.com>2022-05-19 15:50:27 +0200
committerkraktus <kraktus@users.noreply.github.com>2022-12-27 09:50:01 +0100
commiteb63dea57f4e7d9f07810515b0e43966fc4d78e4 (patch)
tree9f8b72b44d47cd64c0fcce6124835b5e9ce0a534 /src/test/ui/command/command-argv0-debug.rs
parent35a99eef32a2b7b9d8e77dde539f869e522d181f (diff)
downloadrust-eb63dea57f4e7d9f07810515b0e43966fc4d78e4.tar.gz
rust-eb63dea57f4e7d9f07810515b0e43966fc4d78e4.zip
More verbose `Debug` implementation of `std::process:Command`
based on commit: https://github.com/zackmdavis/rust/commit/ccc019aabfdd550944c049625e66c92c815ea1d0 from https://github.com/zackmdavis

close https://github.com/rust-lang/rust/issues/42200

Add env variables and cwd to the shell-like debug output.

Also use the alternate syntax to display a more verbose display, while not showing internal fields and hiding fields when they have their default value.
Diffstat (limited to 'src/test/ui/command/command-argv0-debug.rs')
-rw-r--r--src/test/ui/command/command-argv0-debug.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/test/ui/command/command-argv0-debug.rs b/src/test/ui/command/command-argv0-debug.rs
deleted file mode 100644
index 4aba1229f29..00000000000
--- a/src/test/ui/command/command-argv0-debug.rs
+++ /dev/null
@@ -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""#);
-}