File tree 1 file changed +10
-7
lines changed
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() {
1223
1223
}
1224
1224
1225
1225
#[ cfg( not( target_os = "redox" ) ) ]
1226
- #[ cfg_attr( target_os = "cygwin" , ignore) ]
1227
1226
#[ test]
1228
1227
fn 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
+ } ;
1235
1238
1236
1239
let nobody = User :: from_name ( test_username) . unwrap ( ) . unwrap ( ) ;
1237
1240
let pwd: libc:: passwd = nobody. into ( ) ;
You can’t perform that action at this time.
0 commit comments