diff options
author | Aleksey Kladov <[email protected]> | 2018-02-10 09:35:40 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-02-10 09:35:40 +0000 |
commit | 2ef16a4121ad497e7fb290445ffe644b6b8ceae6 (patch) | |
tree | c9e86b4c2e02c19433f7c6cf8f73578602fb9d26 /tests/testutils/src/lib.rs | |
parent | 419b9b7e5efd895249934551cb2588b27a956f58 (diff) |
G: type item
Diffstat (limited to 'tests/testutils/src/lib.rs')
-rw-r--r-- | tests/testutils/src/lib.rs | 7 |
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> { | |||
76 | fn print_difference(expected: &str, actual: &str, path: &Path) { | 76 | fn 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 | ||