Skip to content

Commit 3bfe733

Browse files
Normalize paths in json mode with and without double backslashes
1 parent 8544742 commit 3bfe733

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/compiletest/src/runtest.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2292,10 +2292,11 @@ impl<'test> TestCx<'test> {
22922292

22932293
let mut normalize_path = |from: &Path, to: &str| {
22942294
let mut from = from.display().to_string();
2295+
normalized = normalized.replace(&from, to);
22952296
if json {
22962297
from = from.replace("\\", "\\\\");
2298+
normalized = normalized.replace(&from, to);
22972299
}
2298-
normalized = normalized.replace(&from, to);
22992300
};
23002301

23012302
let parent_dir = self.testpaths.file.parent().unwrap();

0 commit comments

Comments
 (0)