File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: io:: prelude:: * ;
2
2
3
+ use crate :: env;
3
4
use crate :: fs:: { self , File , OpenOptions } ;
4
5
use crate :: io:: { ErrorKind , SeekFrom } ;
5
6
use crate :: path:: Path ;
@@ -906,7 +907,14 @@ fn read_link() {
906
907
// junction
907
908
assert_eq ! ( check!( fs:: read_link( r"C:\Users\Default User" ) ) , Path :: new( r"C:\Users\Default" ) ) ;
908
909
// junction with special permissions
909
- assert_eq ! ( check!( fs:: read_link( r"C:\Documents and Settings\" ) ) , Path :: new( r"C:\Users" ) ) ;
910
+ // Since not all localized windows versions contain the folder "Documents and Settings" in english,
911
+ // we will briefly check, if it exists and otherwise skip the test. Except during CI we will always execute the test.
912
+ if Path :: new ( r"C:\Documents and Settings\" ) . exists ( ) || env:: var_os ( "CI" ) . is_some ( ) {
913
+ assert_eq ! (
914
+ check!( fs:: read_link( r"C:\Documents and Settings\" ) ) ,
915
+ Path :: new( r"C:\Users" )
916
+ ) ;
917
+ }
910
918
}
911
919
let tmpdir = tmpdir ( ) ;
912
920
let link = tmpdir. join ( "link" ) ;
You can’t perform that action at this time.
0 commit comments