Skip to content

Commit

Permalink
windows doesn't have "ls" on the path so make a test for windows that… (
Browse files Browse the repository at this point in the history
  • Loading branch information
martintc committed Dec 18, 2022
1 parent 7e6eace commit abc9758
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/src/steps/initializers/command_found.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ mod tests {
assert_eq!(false, result.unwrap());
}

#[cfg(target_family = "windows")]
#[test]
fn it_returns_true_when_found() {
let initializer = CommandFound("cmd.exe");
let result = initializer.initialize();

assert_eq!(true, result.is_ok());
assert_eq!(true, result.unwrap());
}

#[cfg(target_family = "unix")]
#[test]
fn it_returns_true_when_found() {
let initializer = CommandFound("ls");
Expand Down

0 comments on commit abc9758

Please sign in to comment.