Skip to content

Commit

Permalink
Normalize assertion strings
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscerie committed Oct 19, 2023
1 parent a345f30 commit 0810cc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion selene-lib/src/lints/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ pub fn test_lint_config_with_output<
let output_path = path_base.with_extension(output_extension);

if let Ok(expected) = fs::read_to_string(&output_path) {
pretty_assertions::assert_eq!(PrettyString(&expected), PrettyString(stderr));
pretty_assertions::assert_eq!(
PrettyString(&expected.replace("\r\n", "\n")),
PrettyString(&stderr.to_string().replace("\r\n", "\n"))
);
} else {
let mut output_file = fs::File::create(output_path).expect("couldn't create output file");
output_file
Expand Down

0 comments on commit 0810cc6

Please sign in to comment.