Skip to content

Commit

Permalink
fix windows line
Browse files Browse the repository at this point in the history
  • Loading branch information
limuy2022 committed May 1, 2024
1 parent 9b7795f commit 438590e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/test_all_examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ pub fn test_run_examples() {
ans_path.push(path.file_name().expect("not file name"));
ans_path.set_extension("txt");
println!("checking {}", ans_path.display());
let mut expected_res = read_to_string(ans_path).unwrap();
#[cfg(target_os = "windows")]
{
expected_res = expected_res.replace("\n", "\r\n");
}
let expected_res = read_to_string(ans_path).unwrap();
let assert = cmd.arg("run").arg(path);
assert.assert().success().stdout(expected_res);
}
Expand Down

0 comments on commit 438590e

Please sign in to comment.