mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-14 08:11:11 +01:00
Fix process test and add more for windows
This commit is contained in:
parent
ced37d7617
commit
cdd8a7b91a
1 changed files with 25 additions and 4 deletions
|
@ -523,6 +523,7 @@ fn get_longest_common_path(paths: &[PathBuf]) -> Option<String> {
|
|||
#[cfg(test)]
|
||||
#[cfg(target_family = "unix")]
|
||||
mod tests {
|
||||
use super::Shell;
|
||||
use crate::pathop::PathOp;
|
||||
use std::collections::HashSet;
|
||||
use std::path::PathBuf;
|
||||
|
@ -533,7 +534,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_start() {
|
||||
let _ = spawn(&["echo".into(), "hi".into()], &[], true, false);
|
||||
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::default(), false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -609,10 +610,30 @@ mod tests {
|
|||
#[cfg(test)]
|
||||
#[cfg(target_family = "windows")]
|
||||
mod tests {
|
||||
use super::spawn;
|
||||
use super::{spawn, Shell};
|
||||
|
||||
#[test]
|
||||
fn test_start() {
|
||||
let _ = spawn(&["echo".into(), "hi".into()], &[], true, false);
|
||||
fn test_default() {
|
||||
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::default(), false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cmd() {
|
||||
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::Cmd, false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_powershell() {
|
||||
let _ = spawn(&["echo".into(), "hi".into()], &[], Shell::Powershell, false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bash() {
|
||||
let _ = spawn(
|
||||
&["echo".into(), "hi".into()],
|
||||
&[],
|
||||
Shell::Unix("bash".into()),
|
||||
false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue