Clean output
This commit is contained in:
parent
687d3d15ba
commit
45c2c9afa5
@ -2708,15 +2708,16 @@ fn compare_output(&self, kind: &str, actual: &str, expected: &str) -> usize {
|
||||
return 0;
|
||||
}
|
||||
|
||||
println!("normalized {}:\n{}\n", kind, actual);
|
||||
println!("expected {}:\n{}\n", kind, expected);
|
||||
println!("diff of {}:\n", kind);
|
||||
|
||||
for diff in diff::lines(expected, actual) {
|
||||
match diff {
|
||||
diff::Result::Left(l) => println!("-{}", l),
|
||||
diff::Result::Both(l, _) => println!(" {}", l),
|
||||
diff::Result::Right(r) => println!("+{}", r),
|
||||
if expected.is_empty() {
|
||||
println!("normalized {}:\n{}\n", kind, actual);
|
||||
} else {
|
||||
println!("diff of {}:\n", kind);
|
||||
for diff in diff::lines(expected, actual) {
|
||||
match diff {
|
||||
diff::Result::Left(l) => println!("-{}", l),
|
||||
diff::Result::Right(r) => println!("+{}", r),
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user