aboutsummaryrefslogtreecommitdiff
path: root/tests/testutils/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-02-10 09:54:34 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-02-10 09:54:34 +0000
commitc3b009b6d24225ad2add62fce8206918fceba3eb (patch)
tree6e68e8242bbc181e5a846754466d4109783b6a2f /tests/testutils/src
parent419b9b7e5efd895249934551cb2588b27a956f58 (diff)
parentdd6e5371ebddeaeecb3d1e2d3d6c8b3c9050bb05 (diff)
Merge #45
45: Types r=matklad a=matklad bors r+
Diffstat (limited to 'tests/testutils/src')
-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