From 5da11d2fd744d65788b6831a048cef6395d73498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sun, 11 Apr 2021 05:01:03 +1200 Subject: [PATCH] Add more unix shell testing --- src/process.rs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/process.rs b/src/process.rs index 2abc929..2428b05 100644 --- a/src/process.rs +++ b/src/process.rs @@ -534,10 +534,25 @@ mod tests { use super::spawn; #[test] - fn test_start() { + fn test_shell_default() { let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::default(), false); } + #[test] + fn test_shell_none() { + let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::None, false); + } + + #[test] + fn test_shell_alternate() { + let _ = spawn( + &["echo".into(), "hi".into()], + &[], + Shell::Unix("bash".into()), + false, + ); + } + #[test] fn longest_common_path_should_return_correct_value() { let single_path = vec![PathBuf::from("/tmp/random/")]; @@ -614,22 +629,22 @@ mod tests { use super::{spawn, Shell}; #[test] - fn test_default() { + fn test_shell_default() { let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::default(), false); } #[test] - fn test_cmd() { + fn test_shell_cmd() { let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::Cmd, false); } #[test] - fn test_powershell() { + fn test_shell_powershell() { let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::Powershell, false); } #[test] - fn test_bash() { + fn test_shell_bash() { let _ = spawn( &["echo".into(), "hi".into()], &[],