Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3bfe733

Browse files
committedNov 7, 2024·
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

Lines changed: 2 additions & 1 deletion
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)
Please sign in to comment.