From 84823f5df595dcc8a833a9002adfbed070e2f230 Mon Sep 17 00:00:00 2001 From: Johan Walles Date: Sun, 20 Dec 2020 08:51:28 +0100 Subject: [PATCH] Make test_testdata_examples() output readable Cred to @Wilfred: https://github.com/colin-kiegel/rust-pretty-assertions/issues/24#issuecomment-701591761 --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 991d747..5885741 100644 --- a/src/main.rs +++ b/src/main.rs @@ -522,7 +522,9 @@ mod tests { let expected_result = fs::read_to_string(expected_path).unwrap(); // Assert that the highlighting output matches the contents of .riff-output - assert_eq!(actual_result, expected_result); + let actual_lines: Vec<&str> = actual_result.split('\n').collect(); + let expected_lines: Vec<&str> = expected_result.split('\n').collect(); + assert_eq!(actual_lines, expected_lines); } } }