diff --git a/tests/utils.rs b/tests/utils.rs index 936efc9..f303fc3 100644 --- a/tests/utils.rs +++ b/tests/utils.rs @@ -26,21 +26,21 @@ pub fn compare_output(command: R, expected: R2) { expected_lines.len(), command_lines.len() ); - for (old, new) in expected_lines.iter().zip(command_lines.iter()) { - if new.starts_with("# ") && old.starts_with("# ") { + for (expected, command) in expected_lines.iter().zip(command_lines.iter()) { + if command.starts_with("# ") && expected.starts_with("# ") { continue; - } else if new.starts_with("# ") { + } else if command.starts_with("# ") { assert!( false, "comment line found in command output, but not in expected output" ); - } else if old.starts_with("# ") { + } else if expected.starts_with("# ") { assert!( false, "comment line found in expected output, but not in command output" ); } - assert_eq!(new, old); + assert_eq!(expected, command); } }