From 396cbe66397ba77184e4ed896f4ba17f623c00f7 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 3 Aug 2023 09:22:54 +0200 Subject: make unsetting env vars print as executable command --- library/std/src/process/tests.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'library/std/src/process') diff --git a/library/std/src/process/tests.rs b/library/std/src/process/tests.rs index 2c331eb0104..0d5321c2eea 100644 --- a/library/std/src/process/tests.rs +++ b/library/std/src/process/tests.rs @@ -543,8 +543,8 @@ fn debug_print() { ); let mut command_with_removed_env = Command::new("boring-name"); - command_with_removed_env.env_remove("BAR"); - assert_eq!(format!("{command_with_removed_env:?}"), r#"unset(BAR) "boring-name""#); + command_with_removed_env.env_remove("FOO").env_remove("BAR"); + assert_eq!(format!("{command_with_removed_env:?}"), r#"unset BAR FOO && "boring-name""#); assert_eq!( format!("{command_with_removed_env:#?}"), format!( @@ -557,6 +557,7 @@ fn debug_print() { clear: false, vars: {{ "BAR": None, + "FOO": None, }}, }}, {PIDFD}}}"# -- cgit 1.4.1-3-g733a5