File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 3131#![ feature( libc) ]
3232#![ feature( link_args) ]
3333#![ feature( staged_api) ]
34- #![ feature( std_misc) ]
3534#![ feature( path) ]
35+ #![ cfg_attr( unix, feature( std_misc) ) ]
3636
3737extern crate libc;
3838#[ macro_use] #[ no_link] extern crate rustc_bitflags;
Original file line number Diff line number Diff line change 4040#![ feature( unicode) ]
4141#![ feature( io) ]
4242#![ feature( path) ]
43- #![ feature( os) ]
4443#![ feature( path_ext) ]
4544#![ feature( fs) ]
4645#![ feature( hash) ]
47- #![ feature( tempdir) ]
4846
4947extern crate arena;
5048extern crate flate;
Original file line number Diff line number Diff line change @@ -1313,6 +1313,8 @@ mod tests {
13131313 check ! ( fs:: set_permissions( & input, p) ) ;
13141314 check ! ( fs:: copy( & input, & out) ) ;
13151315 assert ! ( check!( out. metadata( ) ) . permissions( ) . readonly( ) ) ;
1316+ check ! ( fs:: set_permissions( & input, attr. permissions( ) ) ) ;
1317+ check ! ( fs:: set_permissions( & out, attr. permissions( ) ) ) ;
13161318 }
13171319
13181320 #[ cfg( not( windows) ) ] // FIXME(#10264) operation not permitted?
@@ -1396,10 +1398,13 @@ mod tests {
13961398 let attr = check ! ( fs:: metadata( & file) ) ;
13971399 assert ! ( attr. permissions( ) . readonly( ) ) ;
13981400
1399- match fs:: set_permissions ( & tmpdir. join ( "foo" ) , p) {
1400- Ok ( ..) => panic ! ( "wanted a panic " ) ,
1401+ match fs:: set_permissions ( & tmpdir. join ( "foo" ) , p. clone ( ) ) {
1402+ Ok ( ..) => panic ! ( "wanted an error " ) ,
14011403 Err ( ..) => { }
14021404 }
1405+
1406+ p. set_readonly ( false ) ;
1407+ check ! ( fs:: set_permissions( & file, p) ) ;
14031408 }
14041409
14051410 #[ test]
Original file line number Diff line number Diff line change @@ -592,6 +592,7 @@ mod tests {
592592 }
593593
594594 #[ test]
595+ #[ cfg( not( windows) ) ]
595596 fn to_socket_addr_str_bad ( ) {
596597 assert ! ( tsa( "1200::AB00:1234::2552:7777:1313:34300" ) . is_err( ) ) ;
597598 }
You can’t perform that action at this time.
0 commit comments