rust-just/just-1.5.0-no-cradle.patch

70 lines
1.8 KiB
Diff

diff --git a/tests/choose.rs b/tests/choose.rs
index 6444f2a..a81e124 100644
--- a/tests/choose.rs
+++ b/tests/choose.rs
@@ -140,7 +140,13 @@ fn status_error() {
"exit-2": "#!/usr/bin/env bash\nexit 2\n",
};
- ("chmod", "+x", tmp.path().join("exit-2")).run();
+ let output = Command::new("chmod")
+ .arg("+x")
+ .arg(tmp.path().join("exit-2"))
+ .output()
+ .unwrap();
+
+ assert!(output.status.success());
let path = env::join_paths(
iter::once(tmp.path().to_owned()).chain(env::split_paths(&env::var_os("PATH").unwrap())),
diff --git a/tests/edit.rs b/tests/edit.rs
index c7d72c7..40c82c2 100644
--- a/tests/edit.rs
+++ b/tests/edit.rs
@@ -64,7 +64,13 @@ fn status_error() {
"exit-2": "#!/usr/bin/env bash\nexit 2\n",
};
- ("chmod", "+x", tmp.path().join("exit-2")).run();
+ let output = Command::new("chmod")
+ .arg("+x")
+ .arg(tmp.path().join("exit-2"))
+ .output()
+ .unwrap();
+
+ assert!(output.status.success());
let path = env::join_paths(
iter::once(tmp.path().to_owned()).chain(env::split_paths(&env::var_os("PATH").unwrap())),
diff --git a/tests/fmt.rs b/tests/fmt.rs
index e4c4687..ccf7f5d 100644
--- a/tests/fmt.rs
+++ b/tests/fmt.rs
@@ -107,7 +107,13 @@ fn write_error() {
let justfile_path = test.justfile_path();
- ("chmod", "400", &justfile_path).run();
+ let output = Command::new("chmod")
+ .arg("400")
+ .arg(&justfile_path)
+ .output()
+ .unwrap();
+
+ assert!(output.status.success());
let _tempdir = test.run();
diff --git a/tests/lib.rs b/tests/lib.rs
index 9867e3d..2f47d90 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -5,7 +5,6 @@ pub(crate) use {
tempdir::tempdir,
test::{Output, Test},
},
- cradle::input::Input,
executable_path::executable_path,
just::unindent,
libc::{EXIT_FAILURE, EXIT_SUCCESS},