@@ -1986,12 +1986,22 @@ actual:\n\
1986
1986
fn check_rustdoc_test_option ( & self , res : ProcRes ) {
1987
1987
let mut other_files = Vec :: new ( ) ;
1988
1988
let mut files: HashMap < String , Vec < usize > > = HashMap :: new ( ) ;
1989
- files. insert ( self . testpaths . file . to_str ( ) . unwrap ( ) . to_owned ( ) ,
1989
+ let cwd = env:: current_dir ( ) . unwrap ( ) ;
1990
+ files. insert ( self . testpaths . file . strip_prefix ( & cwd)
1991
+ . unwrap_or ( & self . testpaths . file )
1992
+ . to_str ( )
1993
+ . unwrap ( )
1994
+ . replace ( '\\' , "/" ) ,
1990
1995
self . get_lines ( & self . testpaths . file , Some ( & mut other_files) ) ) ;
1991
1996
for other_file in other_files {
1992
1997
let mut path = self . testpaths . file . clone ( ) ;
1993
1998
path. set_file_name ( & format ! ( "{}.rs" , other_file) ) ;
1994
- files. insert ( path. to_str ( ) . unwrap ( ) . to_owned ( ) , self . get_lines ( & path, None ) ) ;
1999
+ files. insert ( path. strip_prefix ( & cwd)
2000
+ . unwrap_or ( & path)
2001
+ . to_str ( )
2002
+ . unwrap ( )
2003
+ . to_owned ( ) ,
2004
+ self . get_lines ( & path, None ) ) ;
1995
2005
}
1996
2006
1997
2007
let mut tested = 0 ;
@@ -2001,7 +2011,8 @@ actual:\n\
2001
2011
let tmp: Vec < & str > = s. split ( " - " ) . collect ( ) ;
2002
2012
if tmp. len ( ) == 2 {
2003
2013
let path = tmp[ 0 ] . rsplit ( "test " ) . next ( ) . unwrap ( ) ;
2004
- if let Some ( ref mut v) = files. get_mut ( path) {
2014
+ if let Some ( ref mut v) = files. get_mut (
2015
+ & path. replace ( '\\' , "/" ) ) {
2005
2016
tested += 1 ;
2006
2017
let mut iter = tmp[ 1 ] . split ( "(line " ) ;
2007
2018
iter. next ( ) ;
0 commit comments