File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -5718,8 +5718,6 @@ fn test_copy_symlink_overwrite() {
5718
5718
} else {
5719
5719
"cp: will not overwrite just-created 'c\\ 1' with 'b/1'\n "
5720
5720
} ) ;
5721
-
5722
- assert_eq ! ( at. read( "a/1" ) , "hello" ) ;
5723
5721
}
5724
5722
5725
5723
#[ test]
@@ -5731,16 +5729,23 @@ fn test_symlink_mode_overwrite() {
5731
5729
at. write ( "a/t" , "hello" ) ;
5732
5730
at. write ( "b/t" , "hello" ) ;
5733
5731
5734
- ucmd. arg ( "-s" )
5735
- . arg ( "a/t" )
5736
- . arg ( "b/t" )
5737
- . arg ( "." )
5738
- . fails ( )
5739
- . stderr_only ( if cfg ! ( not( target_os = "windows" ) ) {
5740
- "cp: will not overwrite just-created './t' with 'b/t'\n "
5741
- } else {
5742
- "cp: will not overwrite just-created '.\\ t' with 'b/t'\n "
5743
- } ) ;
5732
+ if cfg ! ( not( target_os = "windows" ) ) {
5733
+ ucmd. arg ( "-s" )
5734
+ . arg ( "a/t" )
5735
+ . arg ( "b/t" )
5736
+ . arg ( "." )
5737
+ . fails ( )
5738
+ . stderr_only ( "cp: will not overwrite just-created './t' with 'b/t'\n " ) ;
5744
5739
5745
- assert_eq ! ( at. read( "t" ) , "hello" ) ;
5740
+ assert_eq ! ( at. read( "./t" ) , "hello" ) ;
5741
+ } else {
5742
+ ucmd. arg ( "-s" )
5743
+ . arg ( "a\\ t" )
5744
+ . arg ( "b\\ t" )
5745
+ . arg ( "." )
5746
+ . fails ( )
5747
+ . stderr_only ( "cp: will not overwrite just-created '.\\ t' with 'b\\ t'\n " ) ;
5748
+
5749
+ assert_eq ! ( at. read( ".\\ t" ) , "hello" ) ;
5750
+ }
5746
5751
}
You can’t perform that action at this time.
0 commit comments