diff --git a/crates/moonbuild/src/expect.rs b/crates/moonbuild/src/expect.rs index 9b196082..19e268f5 100644 --- a/crates/moonbuild/src/expect.rs +++ b/crates/moonbuild/src/expect.rs @@ -686,7 +686,10 @@ pub fn snapshot_eq(msg: &str) -> anyhow::Result { } else { "".to_string() }; - let eq = actual == expect; + fn normalize_string(s: &str) -> String { + s.replace("\r\n", "\n").replace('\r', "") + } + let eq = normalize_string(&actual) == normalize_string(&expect); Ok(eq) }