From 20af3472ef107eb3418f750d18b5bca72d6169b7 Mon Sep 17 00:00:00 2001 From: Be Date: Tue, 8 Mar 2022 03:01:19 -0600 Subject: [PATCH] cxx-qt-gen: always use \n line endings for tests --- cxx-qt-gen/src/gen_rs.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cxx-qt-gen/src/gen_rs.rs b/cxx-qt-gen/src/gen_rs.rs index 209adb285..e1886d377 100644 --- a/cxx-qt-gen/src/gen_rs.rs +++ b/cxx-qt-gen/src/gen_rs.rs @@ -1012,7 +1012,10 @@ mod tests { } let output = child.wait_with_output().unwrap(); - let output = String::from_utf8(output.stdout).unwrap(); + let mut output = String::from_utf8(output.stdout).unwrap(); + if cfg!(windows) { + output = output.replace("\r\n", "\n"); + } // Quote does not retain empty lines so we throw them away in the case of the // reference string as to not cause clashes