summaryrefslogtreecommitdiffstats
path: root/vendor/gix-command/tests/command.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
commitcec1877e180393eba0f6ddb0cf97bf3a791631c7 (patch)
tree47b4dac2a9dd9a40c30c251b4d4a72d7ccf77e9f /vendor/gix-command/tests/command.rs
parentAdding debian version 1.74.1+dfsg1-1. (diff)
downloadrustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.tar.xz
rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-command/tests/command.rs')
-rw-r--r--vendor/gix-command/tests/command.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/vendor/gix-command/tests/command.rs b/vendor/gix-command/tests/command.rs
index e2faa7fc9..606066da1 100644
--- a/vendor/gix-command/tests/command.rs
+++ b/vendor/gix-command/tests/command.rs
@@ -82,32 +82,26 @@ mod spawn {
#[test]
fn sh_shell_specific_script_code_with_single_extra_arg() -> crate::Result {
- let out = gix_command::prepare("echo")
+ let out = gix_command::prepare("printf")
.with_shell()
.arg("1")
.spawn()?
.wait_with_output()?;
assert!(out.status.success());
- #[cfg(not(windows))]
- assert_eq!(out.stdout.as_bstr(), "1\n");
- #[cfg(windows)]
- assert_eq!(out.stdout.as_bstr(), "1\r\n");
+ assert_eq!(out.stdout.as_bstr(), "1");
Ok(())
}
#[test]
fn sh_shell_specific_script_code_with_multiple_extra_args() -> crate::Result {
- let out = gix_command::prepare("echo")
+ let out = gix_command::prepare("printf")
.with_shell()
- .arg("1")
- .arg("2")
+ .arg("%s")
+ .arg("arg")
.spawn()?
.wait_with_output()?;
assert!(out.status.success());
- #[cfg(not(windows))]
- assert_eq!(out.stdout.as_bstr(), "1 2\n");
- #[cfg(windows)]
- assert_eq!(out.stdout.as_bstr(), "1 2\r\n");
+ assert_eq!(out.stdout.as_bstr(), "arg");
Ok(())
}
}