From 588d5d1e3dcb87ff59ff37da16850e9302996b39 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 24 Feb 2016 16:20:21 -0500 Subject: [PATCH] translate backslashes to forward slashes in the expected strings --- src/compiletest/runtest.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 1e6e3d3e67944..b7a489d9801fd 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -932,7 +932,9 @@ fn check_expected_errors(expected_errors: Vec, } let prefixes = expected_errors.iter().map(|ee| { - format!("{}:{}:", testpaths.file.display(), ee.line) + let expected = format!("{}:{}:", testpaths.file.display(), ee.line); + // On windows just translate all '\' path separators to '/' + expected.replace(r"\", "/") }).collect::>(); let (expect_help, expect_note) =