Add more unix shell testing

This commit is contained in:
Félix Saparelli 2021-04-11 05:01:03 +12:00
parent 52284ae866
commit 5da11d2fd7
1 changed files with 20 additions and 5 deletions

View File

@ -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()],
&[],