@@ -58,7 +58,7 @@ mod cache {
5858 symlink:: symlink_dir ( & forbidden, tmp. path ( ) . join ( "link-to-dir" ) ) . unwrap ( ) ;
5959 std:: fs:: write ( tmp. path ( ) . join ( "file-in-dir" ) , & [ ] ) . unwrap ( ) ;
6060
61- for dirname in & [ "link-to -dir" , "file-in -dir" ] {
61+ for dirname in & [ "file-in -dir" , "link-to -dir" ] {
6262 cache. unlink_on_collision = false ;
6363 let relative_path = format ! ( "{}/file" , dirname) ;
6464 assert_eq ! (
@@ -284,35 +284,26 @@ fn keep_going_collects_results() {
284284 )
285285 . unwrap ( ) ;
286286
287- assert_eq ! (
288- outcome
289- . errors
290- . iter( )
291- . map(
292- |r| r. error. to_string( ) [ .."object 4f41554f6e0045ef53848fc0c3f33b6a9abc24a9 for checkout at " . len( ) ]
293- . to_owned( )
294- )
295- . collect:: <Vec <_>>( ) ,
296- [
297- "4f41554f6e0045ef53848fc0c3f33b6a9abc24a9" ,
298- "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
299- ]
300- . iter( )
301- . map( |id| format!( "object {} for checkout at " , id) )
302- . collect:: <Vec <_>>( )
303- ) ;
304287 assert_eq ! (
305288 outcome
306289 . errors
307290 . iter( )
308291 . map( |r| r. path. to_path_lossy( ) . into_owned( ) )
309292 . collect:: <Vec <_>>( ) ,
310- paths( [ "dir/content" , "empty" ] )
293+ paths( if opts. fs. symlink {
294+ [ "dir/content" , "empty" ]
295+ } else {
296+ [ "dir/content" , "dir/sub-dir/symlink" ] // not actually a symlink anymore
297+ } )
311298 ) ;
312299
313300 assert_eq ! (
314301 stripped_prefix( & destination, & dir_structure( & destination) ) ,
315- paths( [ "dir/sub-dir/symlink" , "executable" ] ) ,
302+ paths( if opts. fs. symlink {
303+ [ "dir/sub-dir/symlink" , "executable" ]
304+ } else {
305+ [ "empty" , "executable" ]
306+ } ) ,
316307 "some files could not be created"
317308 ) ;
318309
0 commit comments