Skip to content

Commit c4b6037

Browse files
committed
translate backslashes to forward slashes in the expected strings
1 parent d3e480f commit c4b6037

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/compiletest/runtest.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,10 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
932932
}
933933

934934
let prefixes = expected_errors.iter().map(|ee| {
935-
format!("{}:{}:", testpaths.file.display(), ee.line)
935+
let expected = format!("{}:{}:", testpaths.file.display(), ee.line);
936+
// On windows just translate all '\' path separators to '/'
937+
expected.replace(r"\", "/");
938+
expected
936939
}).collect::<Vec<String>>();
937940

938941
let (expect_help, expect_note) =

0 commit comments

Comments
 (0)