@@ -789,7 +789,10 @@ fn save_config_one_store() {
789789 let config = fs:: read_to_string ( config_file. path ( ) ) . unwrap ( ) ;
790790
791791 assert ! ( config. contains( "[stores.\" s1 name\" ]\n " ) ) ;
792- assert ! ( config. contains( & format!( "path = \" {}\" \n " , passdir. path( ) . display( ) ) ) ) ;
792+ assert ! ( config. contains( & format!(
793+ "path = \" {}\" \n " ,
794+ passdir. path( ) . canonicalize( ) . unwrap( ) . display( )
795+ ) ) ) ;
793796 assert ! ( config. contains( & format!(
794797 "style_path = \" {}\" \n " ,
795798 style_file. path( ) . display( )
@@ -823,7 +826,10 @@ fn save_config_one_store_with_pgp_impl() {
823826
824827 assert ! ( data. contains( "[stores.default]" ) ) ;
825828 assert ! ( data. contains( "pgp_implementation = \" gpg\" " ) ) ;
826- assert ! ( data. contains( & format!( "path = \" {}\" \n " , & dir. path( ) . display( ) ) ) ) ;
829+ assert ! ( data. contains( & format!(
830+ "path = \" {}\" \n " ,
831+ & dir. path( ) . canonicalize( ) . unwrap( ) . display( )
832+ ) ) ) ;
827833}
828834
829835#[ test]
@@ -854,7 +860,10 @@ fn save_config_one_store_with_fingerprint() {
854860 assert ! ( data. contains( "[stores.default]" ) ) ;
855861 assert ! ( data. contains( "pgp_implementation = \" sequoia\" " ) ) ;
856862 assert ! ( data. contains( "own_fingerprint = \" 7E068070D5EF794B00C8A9D91D108E6C07CBC406\" " ) ) ;
857- assert ! ( data. contains( & format!( "path = \" {}\" \n " , & dir. path( ) . display( ) ) ) ) ;
863+ assert ! ( data. contains( & format!(
864+ "path = \" {}\" \n " ,
865+ & dir. path( ) . canonicalize( ) . unwrap( ) . display( )
866+ ) ) ) ;
858867}
859868
860869#[ test]
@@ -2438,8 +2447,10 @@ fn test_recipients_file_for_dir() -> Result<()> {
24382447 File :: create ( td. path ( ) . join ( ".gpg-id" ) ) ?;
24392448
24402449 assert_eq ! (
2441- td. path( ) . join( ".gpg-id" ) ,
2442- store. recipients_file_for_dir( & store. get_store_path( ) ) ?
2450+ td. path( ) . join( ".gpg-id" ) . canonicalize( ) ?,
2451+ store
2452+ . recipients_file_for_dir( & store. get_store_path( ) ) ?
2453+ . canonicalize( ) ?
24432454 ) ;
24442455 Ok ( ( ) )
24452456}
0 commit comments