Skip to content

Commit 7787e09

Browse files
authored
fix(tests): escape carriage returns when checking log (#5220)
1 parent 9defcd2 commit 7787e09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cli/tests/it/script.rs

+5
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,11 @@ forgetest_async!(
753753
std::fs::read_to_string("cache/Broadcast.t.sol/31337/run-latest.json").unwrap();
754754
let run_log = re.replace_all(&run_log, "");
755755

756+
// Clean up carriage return OS differences
757+
let re = Regex::new(r#"\\r\\n"#).unwrap();
758+
let fixtures_log = re.replace_all(&fixtures_log, "\n");
759+
let run_log = re.replace_all(&run_log, "\n");
760+
756761
pretty_assertions::assert_eq!(fixtures_log, run_log);
757762
}
758763
);

0 commit comments

Comments
 (0)