summaryrefslogtreecommitdiffstats
path: root/vendor/gix-command/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/gix-command/tests
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.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')
-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(())
}
}