Skip to content

Commit fd0632f

Browse files
author
Jonathan Turner
committed
Fix for filepath for cfail tests in windows
1 parent 399149a commit fd0632f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tools/compiletest/src/json.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use errors::{Error, ErrorKind};
1212
use rustc_serialize::json;
1313
use std::str::FromStr;
14+
use std::path::Path;
1415

1516
// These structs are a subset of the ones found in
1617
// `syntax::errors::json`.
@@ -82,7 +83,9 @@ fn push_expected_errors(expected_errors: &mut Vec<Error>,
8283
file_name: &str) {
8384
// We only consider messages pertaining to the current file.
8485
let matching_spans = || {
85-
diagnostic.spans.iter().filter(|span| span.file_name == file_name)
86+
diagnostic.spans.iter().filter(|span| {
87+
Path::new(&span.file_name) == Path::new(&file_name)
88+
})
8689
};
8790

8891
// We break the output into multiple lines, and then append the

0 commit comments

Comments
 (0)