Add more unix shell testing
This commit is contained in:
parent
52284ae866
commit
5da11d2fd7
|
@ -534,10 +534,25 @@ mod tests {
|
||||||
use super::spawn;
|
use super::spawn;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_start() {
|
fn test_shell_default() {
|
||||||
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::default(), false);
|
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]
|
#[test]
|
||||||
fn longest_common_path_should_return_correct_value() {
|
fn longest_common_path_should_return_correct_value() {
|
||||||
let single_path = vec![PathBuf::from("/tmp/random/")];
|
let single_path = vec![PathBuf::from("/tmp/random/")];
|
||||||
|
@ -614,22 +629,22 @@ mod tests {
|
||||||
use super::{spawn, Shell};
|
use super::{spawn, Shell};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_default() {
|
fn test_shell_default() {
|
||||||
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::default(), false);
|
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::default(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_cmd() {
|
fn test_shell_cmd() {
|
||||||
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::Cmd, false);
|
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::Cmd, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_powershell() {
|
fn test_shell_powershell() {
|
||||||
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::Powershell, false);
|
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::Powershell, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bash() {
|
fn test_shell_bash() {
|
||||||
let _ = spawn(
|
let _ = spawn(
|
||||||
&["echo".into(), "hi".into()],
|
&["echo".into(), "hi".into()],
|
||||||
&[],
|
&[],
|
||||||
|
|
Loading…
Reference in New Issue