@@ -1987,12 +1987,22 @@ actual:\n\
1987
1987
fn check_rustdoc_test_option ( & self , res : ProcRes ) {
1988
1988
let mut other_files = Vec :: new ( ) ;
1989
1989
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 ( '\\' , "/" ) ,
1991
1996
self . get_lines ( & self . testpaths . file , Some ( & mut other_files) ) ) ;
1992
1997
for other_file in other_files {
1993
1998
let mut path = self . testpaths . file . clone ( ) ;
1994
1999
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 ) ) ;
1996
2006
}
1997
2007
1998
2008
let mut tested = 0 ;
@@ -2002,7 +2012,8 @@ actual:\n\
2002
2012
let tmp: Vec < & str > = s. split ( " - " ) . collect ( ) ;
2003
2013
if tmp. len ( ) == 2 {
2004
2014
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 ( '\\' , "/" ) ) {
2006
2017
tested += 1 ;
2007
2018
let mut iter = tmp[ 1 ] . split ( "(line " ) ;
2008
2019
iter. next ( ) ;
0 commit comments