From ef9ecd511ffc60cd774cfec1b0751e1b63684178 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Wed, 9 Feb 2022 12:44:08 -0300 Subject: [PATCH] fix(ci): windows tests --- core/tauri/src/api/file.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/tauri/src/api/file.rs b/core/tauri/src/api/file.rs index 8b0f4dc37..1699c7c35 100644 --- a/core/tauri/src/api/file.rs +++ b/core/tauri/src/api/file.rs @@ -48,8 +48,10 @@ mod test { assert!(res.is_err()); - #[cfg(not(windows))] if let Error::Io(e) = res.unwrap_err() { + #[cfg(windows)] + assert_eq!(e.to_string(), "Access is denied. (os error 5)".to_string()); + #[cfg(not(windows))] assert_eq!(e.to_string(), "Is a directory (os error 21)".to_string()); } } @@ -86,9 +88,8 @@ mod test { assert!(res.is_err()); + #[cfg(not(windows))] if let Error::Io(e) = res.unwrap_err() { - #[cfg(windows)] - assert_eq!(e.to_string(), "Access is denied. (os error 5)".to_string()); #[cfg(not(windows))] assert_eq!(e.to_string(), "Is a directory (os error 21)".to_string()); }