File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1731,11 +1731,11 @@ fn test_windows_absolute() {
17311731 let relative = r"a\b" ;
17321732 let mut expected = crate :: env:: current_dir ( ) . unwrap ( ) ;
17331733 expected. push ( relative) ;
1734- assert_eq ! ( absolute( relative) . unwrap( ) , expected) ;
1734+ assert_eq ! ( absolute( relative) . unwrap( ) . as_os_str ( ) , expected. as_os_str ( ) ) ;
17351735
17361736 macro_rules! unchanged(
17371737 ( $path: expr) => {
1738- assert_eq!( absolute( $path) . unwrap( ) , Path :: new( $path) ) ;
1738+ assert_eq!( absolute( $path) . unwrap( ) . as_os_str ( ) , Path :: new( $path) . as_os_str ( ) ) ;
17391739 }
17401740 ) ;
17411741
@@ -1751,7 +1751,10 @@ fn test_windows_absolute() {
17511751 // Verbatim paths are always unchanged, no matter what.
17521752 unchanged ! ( r"\\?\path.\to/file.." ) ;
17531753
1754- assert_eq ! ( absolute( r"C:\path..\to.\file." ) . unwrap( ) , Path :: new( r"C:\path..\to\file" ) ) ;
1754+ assert_eq ! (
1755+ absolute( r"C:\path..\to.\file." ) . unwrap( ) . as_os_str( ) ,
1756+ Path :: new( r"C:\path..\to\file" ) . as_os_str( )
1757+ ) ;
17551758 assert_eq ! ( absolute( r"COM1" ) . unwrap( ) . as_os_str( ) , Path :: new( r"\\.\COM1" ) . as_os_str( ) ) ;
17561759}
17571760
You can’t perform that action at this time.
0 commit comments