Skip to content

Commit

Permalink
fix test failure on compare lines ending with "\r\n" and "\n" (#132)
Browse files Browse the repository at this point in the history
* [fix] fix test failure on "crlf"

starcoinorg/starcoin#3401

* restore M.move symlink

Signed-off-by: satyamacn <[email protected]>
Closes: #340
  • Loading branch information
jiangying000 authored and bors-diem committed Jan 13, 2023
1 parent 48743f4 commit 501bf4b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,10 @@ fn handle_expected_output(test_path: &Path, output: impl AsRef<str>) -> Result<(
if !exp_path.exists() {
std::fs::write(&exp_path, "").unwrap();
}
let expected_output = std::fs::read_to_string(&exp_path).unwrap();
let expected_output = std::fs::read_to_string(&exp_path)
.unwrap()
.replace("\r\n", "\n")
.replace("\r", "\n");
if output != expected_output {
let msg = format!(
"Expected errors differ from actual errors:\n{}",
Expand Down

0 comments on commit 501bf4b

Please sign in to comment.