Skip to content

Commit

Permalink
Fix for filepath for cfail tests in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Turner committed Apr 22, 2016
1 parent 399149a commit fd0632f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tools/compiletest/src/json.rs
Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fd0632f

Please sign in to comment.