Use bash
as shell for all integration tests (#479)
This commit changes the integration tests to run with bash as the shell, instead of bash, dash, and the system's sh. Running the integration tests with multiple shells has never revealed a bug in Just, and they make the tests take longer, so let's get rid of them.
This commit is contained in:
parent
2818d4da1c
commit
be3ec13d1c
@ -38,21 +38,14 @@ macro_rules! integration_test {
|
|||||||
stderr: $stderr:expr,
|
stderr: $stderr:expr,
|
||||||
status: $status:expr,
|
status: $status:expr,
|
||||||
) => {
|
) => {
|
||||||
mod $name {
|
#[test]
|
||||||
use super::*;
|
fn $name() {
|
||||||
|
integration_test($text, &[$($arg)*], $stdin, $stdout, $stderr, $status);
|
||||||
// silence unused import warnings
|
|
||||||
const __: i32 = EXIT_SUCCESS;
|
|
||||||
|
|
||||||
#[test] fn sh() { integration_test("sh", $text, &[$($arg)*], $stdin, $stdout, $stderr, $status); }
|
|
||||||
#[test] fn dash() { integration_test("dash", $text, &[$($arg)*], $stdin, $stdout, $stderr, $status); }
|
|
||||||
#[test] fn bash() { integration_test("bash", $text, &[$($arg)*], $stdin, $stdout, $stderr, $status); }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn integration_test(
|
fn integration_test(
|
||||||
shell: &str,
|
|
||||||
justfile: &str,
|
justfile: &str,
|
||||||
args: &[&str],
|
args: &[&str],
|
||||||
stdin: &str,
|
stdin: &str,
|
||||||
@ -72,7 +65,7 @@ fn integration_test(
|
|||||||
|
|
||||||
let mut child = Command::new(&executable_path("just"))
|
let mut child = Command::new(&executable_path("just"))
|
||||||
.current_dir(tmp.path())
|
.current_dir(tmp.path())
|
||||||
.args(&["--shell", shell])
|
.args(&["--shell", "bash"])
|
||||||
.args(args)
|
.args(args)
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
|
Loading…
Reference in New Issue
Block a user