@@ -1987,12 +1987,22 @@ actual:\n\
19871987 fn check_rustdoc_test_option ( & self , res : ProcRes ) {
19881988 let mut other_files = Vec :: new ( ) ;
19891989 let mut files: HashMap < String , Vec < usize > > = HashMap :: new ( ) ;
1990- files. insert ( self . testpaths . file . to_str ( ) . unwrap ( ) . to_owned ( ) ,
1990+ let cwd = env:: current_dir ( ) . unwrap ( ) ;
1991+ files. insert ( self . testpaths . file . strip_prefix ( & cwd)
1992+ . unwrap_or ( & self . testpaths . file )
1993+ . to_str ( )
1994+ . unwrap ( )
1995+ . replace ( '\\' , "/" ) ,
19911996 self . get_lines ( & self . testpaths . file , Some ( & mut other_files) ) ) ;
19921997 for other_file in other_files {
19931998 let mut path = self . testpaths . file . clone ( ) ;
19941999 path. set_file_name ( & format ! ( "{}.rs" , other_file) ) ;
1995- files. insert ( path. to_str ( ) . unwrap ( ) . to_owned ( ) , self . get_lines ( & path, None ) ) ;
2000+ files. insert ( path. strip_prefix ( & cwd)
2001+ . unwrap_or ( & path)
2002+ . to_str ( )
2003+ . unwrap ( )
2004+ . replace ( '\\' , "/" ) ,
2005+ self . get_lines ( & path, None ) ) ;
19962006 }
19972007
19982008 let mut tested = 0 ;
@@ -2002,7 +2012,8 @@ actual:\n\
20022012 let tmp: Vec < & str > = s. split ( " - " ) . collect ( ) ;
20032013 if tmp. len ( ) == 2 {
20042014 let path = tmp[ 0 ] . rsplit ( "test " ) . next ( ) . unwrap ( ) ;
2005- if let Some ( ref mut v) = files. get_mut ( path) {
2015+ if let Some ( ref mut v) = files. get_mut (
2016+ & path. replace ( '\\' , "/" ) ) {
20062017 tested += 1 ;
20072018 let mut iter = tmp[ 1 ] . split ( "(line " ) ;
20082019 iter. next ( ) ;
0 commit comments