diff options
| author | Jonathan Turner <jturner@mozilla.com> | 2016-04-21 18:24:37 -0700 |
|---|---|---|
| committer | Jonathan Turner <jturner@mozilla.com> | 2016-04-21 18:24:44 -0700 |
| commit | fd0632fad63d5eb83a1571a1f854af98c5557b2a (patch) | |
| tree | 79c8f57f2059ea89824be93ca9e58a6676d84d5a /src/tools/compiletest | |
| parent | 399149ac7efda98e2290d5bf5c38f51d51b5b18f (diff) | |
Fix for filepath for cfail tests in windows
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/json.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/json.rs b/src/tools/compiletest/src/json.rs index bbe038509e3..43b5572dfd6 100644 --- a/src/tools/compiletest/src/json.rs +++ b/src/tools/compiletest/src/json.rs @@ -11,6 +11,7 @@ use errors::{Error, ErrorKind}; use rustc_serialize::json; use std::str::FromStr; +use std::path::Path; // These structs are a subset of the ones found in // `syntax::errors::json`. @@ -82,7 +83,9 @@ fn push_expected_errors(expected_errors: &mut Vec<Error>, file_name: &str) { // We only consider messages pertaining to the current file. let matching_spans = || { - diagnostic.spans.iter().filter(|span| span.file_name == file_name) + diagnostic.spans.iter().filter(|span| { + Path::new(&span.file_name) == Path::new(&file_name) + }) }; // We break the output into multiple lines, and then append the |
