File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -1223,15 +1223,18 @@ fn test_access_file_exists() {
12231223}
12241224
12251225#[ cfg( not( target_os = "redox" ) ) ]
1226- #[ cfg_attr( target_os = "cygwin" , ignore) ]
12271226#[ test]
12281227fn test_user_into_passwd ( ) {
1229- // get the UID of the "nobody" user
1230- #[ cfg( not( target_os = "haiku" ) ) ]
1231- let test_username = "nobody" ;
1232- // "nobody" unavailable on haiku
1233- #[ cfg( target_os = "haiku" ) ]
1234- let test_username = "user" ;
1228+ let test_username = if cfg ! ( target_os = "haiku" ) {
1229+ // "nobody" unavailable on haiku
1230+ "user"
1231+ } else if cfg ! ( target_os = "cygwin" ) {
1232+ // the Windows admin user
1233+ "Administrator"
1234+ } else {
1235+ // get the UID of the "nobody" user
1236+ "nobody"
1237+ } ;
12351238
12361239 let nobody = User :: from_name ( test_username) . unwrap ( ) . unwrap ( ) ;
12371240 let pwd: libc:: passwd = nobody. into ( ) ;
You can’t perform that action at this time.
0 commit comments