From 8ff7040a0aa7d94afad5085ab73fa48cade7e4d1 Mon Sep 17 00:00:00 2001 From: veeso Date: Thu, 4 Mar 2021 16:51:18 +0100 Subject: [PATCH] Localhost exec for windows --- src/host/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/host/mod.rs b/src/host/mod.rs index 841d1a1..d2a7dd9 100644 --- a/src/host/mod.rs +++ b/src/host/mod.rs @@ -971,7 +971,10 @@ mod tests { let tmpdir: tempfile::TempDir = tempfile::TempDir::new().unwrap(); let host: Localhost = Localhost::new(PathBuf::from(tmpdir.path())).ok().unwrap(); // Execute + #[cfg(any(target_os = "unix", target_os = "macos", target_os = "linux"))] assert_eq!(host.exec("echo 5").ok().unwrap().as_str(), "5\n"); + #[cfg(target_os = "windows")] + assert_eq!(host.exec("echo 5").ok().unwrap().as_str(), "5\r\n"); } #[test]