aboutsummaryrefslogtreecommitdiff
path: root/tests/testutils
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testutils')
-rw-r--r--tests/testutils/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/testutils/src/lib.rs b/tests/testutils/src/lib.rs
index f829b243b..d181e455b 100644
--- a/tests/testutils/src/lib.rs
+++ b/tests/testutils/src/lib.rs
@@ -76,15 +76,14 @@ fn test_from_dir(dir: &Path) -> Vec<PathBuf> {
76fn print_difference(expected: &str, actual: &str, path: &Path) { 76fn print_difference(expected: &str, actual: &str, path: &Path) {
77 let dir = project_dir(); 77 let dir = project_dir();
78 let path = path.strip_prefix(&dir).unwrap_or_else(|_| path); 78 let path = path.strip_prefix(&dir).unwrap_or_else(|_| path);
79 println!("\nfile: {}", path.display());
80 if expected.trim() == actual.trim() { 79 if expected.trim() == actual.trim() {
81 println!("whitespace difference"); 80 println!("whitespace difference, rewriting");
82 println!("rewriting the file");
83 file::put_text(path, actual).unwrap(); 81 file::put_text(path, actual).unwrap();
84 } else { 82 } else {
85 let changeset = Changeset::new(actual, expected, "\n"); 83 let changeset = Changeset::new(actual, expected, "\n");
86 println!("{}", changeset); 84 print!("{}", changeset);
87 } 85 }
86 println!("file: {}\n", path.display());
88 panic!("Comparison failed") 87 panic!("Comparison failed")
89} 88}
90 89