@@ -667,37 +667,34 @@ mod tests {
667667
668668 #[ test]
669669 fn test_numbered_backup_path ( ) {
670- assert_eq ! ( numbered_backup_path( & Path :: new( "" ) ) , PathBuf :: from( ".~1~" ) ) ;
670+ assert_eq ! ( numbered_backup_path( Path :: new( "" ) ) , PathBuf :: from( ".~1~" ) ) ;
671+ assert_eq ! ( numbered_backup_path( Path :: new( "/" ) ) , PathBuf :: from( "/.~1~" ) ) ;
671672 assert_eq ! (
672- numbered_backup_path( & Path :: new( "/" ) ) ,
673- PathBuf :: from( "/.~1~" )
674- ) ;
675- assert_eq ! (
676- numbered_backup_path( & Path :: new( "/hello/world" ) ) ,
673+ numbered_backup_path( Path :: new( "/hello/world" ) ) ,
677674 PathBuf :: from( "/hello/world.~1~" )
678675 ) ;
679676 assert_eq ! (
680- numbered_backup_path( & Path :: new( "/hello/world/" ) ) ,
677+ numbered_backup_path( Path :: new( "/hello/world/" ) ) ,
681678 PathBuf :: from( "/hello/world.~1~" )
682679 ) ;
683680 }
684681
685682 #[ test]
686683 fn test_simple_backup_path ( ) {
687684 assert_eq ! (
688- simple_backup_path( & Path :: new( "" ) , ".bak" ) ,
685+ simple_backup_path( Path :: new( "" ) , ".bak" ) ,
689686 PathBuf :: from( ".bak" )
690687 ) ;
691688 assert_eq ! (
692- simple_backup_path( & Path :: new( "/" ) , ".bak" ) ,
689+ simple_backup_path( Path :: new( "/" ) , ".bak" ) ,
693690 PathBuf :: from( "/.bak" )
694691 ) ;
695692 assert_eq ! (
696- simple_backup_path( & Path :: new( "/hello/world" ) , ".bak" ) ,
693+ simple_backup_path( Path :: new( "/hello/world" ) , ".bak" ) ,
697694 PathBuf :: from( "/hello/world.bak" )
698695 ) ;
699696 assert_eq ! (
700- simple_backup_path( & Path :: new( "/hello/world/" ) , ".bak" ) ,
697+ simple_backup_path( Path :: new( "/hello/world/" ) , ".bak" ) ,
701698 PathBuf :: from( "/hello/world.bak" )
702699 ) ;
703700 }
0 commit comments