From a3362f3adef05d2fdd262d0fd6963fc62741dc7a Mon Sep 17 00:00:00 2001 From: chip Date: Fri, 24 Jul 2020 04:09:56 -0700 Subject: [PATCH] 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. --- tauri-api/src/command.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tauri-api/src/command.rs b/tauri-api/src/command.rs index f9ac39806..e4083efea 100644 --- a/tauri-api/src/command.rs +++ b/tauri-api/src/command.rs @@ -93,9 +93,9 @@ pub fn binary_command(binary_name: String) -> crate::Result { #[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");