about summary refs log tree commit diff
path: root/library/std/src/process/tests.rs
diff options
context:
space:
mode:
authorChris Denton <christophersdenton@gmail.com>2021-08-13 21:50:46 +0100
committerChris Denton <christophersdenton@gmail.com>2021-10-30 12:03:49 +0100
commit07f54d94e608fc29e8aad386831dacee397e2282 (patch)
tree88c00441a2cbb1dbeb267e45a1d1b009be126ae7 /library/std/src/process/tests.rs
parent2b643e987173b36cb0279a018579372e31a35776 (diff)
downloadrust-07f54d94e608fc29e8aad386831dacee397e2282.tar.gz
rust-07f54d94e608fc29e8aad386831dacee397e2282.zip
Use "rustc" for testing Command args
"echo" is not an application on Windows so `Command` tests could fail even if that's not what's being tested for.
Diffstat (limited to 'library/std/src/process/tests.rs')
-rw-r--r--library/std/src/process/tests.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/process/tests.rs b/library/std/src/process/tests.rs
index bc71c150550..094d2efbdd5 100644
--- a/library/std/src/process/tests.rs
+++ b/library/std/src/process/tests.rs
@@ -297,7 +297,7 @@ fn test_interior_nul_in_progname_is_error() {
 
 #[test]
 fn test_interior_nul_in_arg_is_error() {
-    match Command::new("echo").arg("has-some-\0\0s-inside").spawn() {
+    match Command::new("rustc").arg("has-some-\0\0s-inside").spawn() {
         Err(e) => assert_eq!(e.kind(), ErrorKind::InvalidInput),
         Ok(_) => panic!(),
     }
@@ -305,7 +305,7 @@ fn test_interior_nul_in_arg_is_error() {
 
 #[test]
 fn test_interior_nul_in_args_is_error() {
-    match Command::new("echo").args(&["has-some-\0\0s-inside"]).spawn() {
+    match Command::new("rustc").args(&["has-some-\0\0s-inside"]).spawn() {
         Err(e) => assert_eq!(e.kind(), ErrorKind::InvalidInput),
         Ok(_) => panic!(),
     }
@@ -313,7 +313,7 @@ fn test_interior_nul_in_args_is_error() {
 
 #[test]
 fn test_interior_nul_in_current_dir_is_error() {
-    match Command::new("echo").current_dir("has-some-\0\0s-inside").spawn() {
+    match Command::new("rustc").current_dir("has-some-\0\0s-inside").spawn() {
         Err(e) => assert_eq!(e.kind(), ErrorKind::InvalidInput),
         Ok(_) => panic!(),
     }