disable tests that fail on default windows installs (#890)

cat is not available as a command on a default windows install.
This disables the command test that uses cat during tests.  It also
disables `test_cmd_fail` even though it passes, because the test
is testing the wrong thing in this case.
This commit is contained in:
chip
2020-07-24 04:09:56 -07:00
committed by GitHub
parent 4abd12c2a4
commit a3362f3ade

View File

@@ -93,9 +93,9 @@ pub fn binary_command(binary_name: String) -> crate::Result<String> {
#[cfg(test)]
mod test {
use super::*;
use crate::Error;
use std::io;
#[cfg(not(windows))]
#[test]
// test the get_output function with a unix cat command.
fn test_cmd_output() {
@@ -115,9 +115,12 @@ mod test {
}
}
#[cfg(not(windows))]
#[test]
// test the failure case for get_output
fn test_cmd_fail() {
use crate::Error;
// queue up a string with cat in it.
let cmd = String::from("cat");