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