From a7e876d927043c1ae36267e7749c0a951b2861cf Mon Sep 17 00:00:00 2001 From: TheVeryDarkness <3266343194@qq.com> Date: Wed, 4 Sep 2024 08:52:08 +0800 Subject: [PATCH] Fix tests on windows. Replace LF with CRLF in expected output. --- tests/test_bin.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_bin.rs b/tests/test_bin.rs index 8b2967f..5b125b8 100644 --- a/tests/test_bin.rs +++ b/tests/test_bin.rs @@ -4,6 +4,8 @@ use std::{ }; fn test_example(name: &str, input: &str, out: &str) { + #[cfg(target_os = "windows")] + let out = out.replace("\n", "\r\n"); let mut child = Command::new("cargo") .arg("run") .arg("--example")