File tree 1 file changed +6
-3
lines changed
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() {
1731
1731
let relative = r"a\b" ;
1732
1732
let mut expected = crate :: env:: current_dir ( ) . unwrap ( ) ;
1733
1733
expected. push ( relative) ;
1734
- assert_eq ! ( absolute( relative) . unwrap( ) , expected) ;
1734
+ assert_eq ! ( absolute( relative) . unwrap( ) . as_os_str ( ) , expected. as_os_str ( ) ) ;
1735
1735
1736
1736
macro_rules! unchanged(
1737
1737
( $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 ( ) ) ;
1739
1739
}
1740
1740
) ;
1741
1741
@@ -1751,7 +1751,10 @@ fn test_windows_absolute() {
1751
1751
// Verbatim paths are always unchanged, no matter what.
1752
1752
unchanged ! ( r"\\?\path.\to/file.." ) ;
1753
1753
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
+ ) ;
1755
1758
assert_eq ! ( absolute( r"COM1" ) . unwrap( ) . as_os_str( ) , Path :: new( r"\\.\COM1" ) . as_os_str( ) ) ;
1756
1759
}
1757
1760
You can’t perform that action at this time.
0 commit comments