From be3ec13d1cc541ee12f5c0a52f00bc478a2765c5 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 5 Oct 2019 23:08:22 -0700 Subject: [PATCH] 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. --- tests/integration.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index 6437bfe..19c38eb 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -38,21 +38,14 @@ macro_rules! integration_test { stderr: $stderr:expr, status: $status:expr, ) => { - mod $name { - use super::*; - - // 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); } + #[test] + fn $name() { + integration_test($text, &[$($arg)*], $stdin, $stdout, $stderr, $status); } } } fn integration_test( - shell: &str, justfile: &str, args: &[&str], stdin: &str, @@ -72,7 +65,7 @@ fn integration_test( let mut child = Command::new(&executable_path("just")) .current_dir(tmp.path()) - .args(&["--shell", shell]) + .args(&["--shell", "bash"]) .args(args) .stdin(Stdio::piped()) .stdout(Stdio::piped())