Commit aed31ee 1 parent 11ddfb8 commit aed31ee Copy full SHA for aed31ee
File tree 4 files changed +9
-5
lines changed
4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 31
31
#![ feature( libc) ]
32
32
#![ feature( link_args) ]
33
33
#![ feature( staged_api) ]
34
- #![ feature( std_misc) ]
35
34
#![ feature( path) ]
35
+ #![ cfg_attr( unix, feature( std_misc) ) ]
36
36
37
37
extern crate libc;
38
38
#[ macro_use] #[ no_link] extern crate rustc_bitflags;
Original file line number Diff line number Diff line change 40
40
#![ feature( unicode) ]
41
41
#![ feature( io) ]
42
42
#![ feature( path) ]
43
- #![ feature( os) ]
44
43
#![ feature( path_ext) ]
45
44
#![ feature( fs) ]
46
45
#![ feature( hash) ]
47
- #![ feature( tempdir) ]
48
46
49
47
extern crate arena;
50
48
extern crate flate;
Original file line number Diff line number Diff line change @@ -1313,6 +1313,8 @@ mod tests {
1313
1313
check ! ( fs:: set_permissions( & input, p) ) ;
1314
1314
check ! ( fs:: copy( & input, & out) ) ;
1315
1315
assert ! ( check!( out. metadata( ) ) . permissions( ) . readonly( ) ) ;
1316
+ check ! ( fs:: set_permissions( & input, attr. permissions( ) ) ) ;
1317
+ check ! ( fs:: set_permissions( & out, attr. permissions( ) ) ) ;
1316
1318
}
1317
1319
1318
1320
#[ cfg( not( windows) ) ] // FIXME(#10264) operation not permitted?
@@ -1396,10 +1398,13 @@ mod tests {
1396
1398
let attr = check ! ( fs:: metadata( & file) ) ;
1397
1399
assert ! ( attr. permissions( ) . readonly( ) ) ;
1398
1400
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 " ) ,
1401
1403
Err ( ..) => { }
1402
1404
}
1405
+
1406
+ p. set_readonly ( false ) ;
1407
+ check ! ( fs:: set_permissions( & file, p) ) ;
1403
1408
}
1404
1409
1405
1410
#[ test]
Original file line number Diff line number Diff line change @@ -592,6 +592,7 @@ mod tests {
592
592
}
593
593
594
594
#[ test]
595
+ #[ cfg( not( windows) ) ]
595
596
fn to_socket_addr_str_bad ( ) {
596
597
assert ! ( tsa( "1200::AB00:1234::2552:7777:1313:34300" ) . is_err( ) ) ;
597
598
}
You can’t perform that action at this time.
0 commit comments