File tree 3 files changed +14
-15
lines changed
3 files changed +14
-15
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: a0a2cee8960d67eb0e901d09bd34c504ef3e699b
2
+ refs/heads/master: 06a6005447da632200a8b1b8a36dad21c39264df
Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ mod libc_constants {
32
32
fn O_RDONLY ( ) -> int { ret 0 ; }
33
33
fn O_WRONLY ( ) -> int { ret 1 ; }
34
34
fn O_RDWR ( ) -> int { ret 2 ; }
35
- fn O_APPEND ( ) -> int { ret 1024 ; }
36
- fn O_CREAT ( ) -> int { ret 64 ; }
37
- fn O_EXCL ( ) -> int { ret 128 ; }
38
- fn O_TRUNC ( ) -> int { ret 512 ; }
39
- fn O_TEXT ( ) -> int { ret 16384 ; }
40
- fn O_BINARY ( ) -> int { ret 32768 ; }
35
+ fn O_APPEND ( ) -> int { ret 0x0008 ; }
36
+ fn O_CREAT ( ) -> int { ret 0x0100 ; }
37
+ fn O_EXCL ( ) -> int { ret 0x0400 ; }
38
+ fn O_TRUNC ( ) -> int { ret 0x0200 ; }
39
+ fn O_TEXT ( ) -> int { ret 0x4000 ; }
40
+ fn O_BINARY ( ) -> int { ret 0x8000 ; }
41
41
fn S_IRUSR ( ) -> uint {
42
42
ret 256 u; // really _S_IREAD in win32
43
43
Original file line number Diff line number Diff line change 1
-
2
-
3
1
// xfail-stage0
4
- // xfail-stage1
5
- // xfail-stage2
6
2
// -*- rust -*-
7
3
use std;
8
4
import std:: io;
9
5
import std:: str;
10
6
11
- fn test_simple ( str tmpfilebase ) {
12
- let str tmpfile = tmpfilebase + " .tmp";
7
+ fn test_simple ( ) {
8
+ let str tmpfile = "test/run-pass/lib-io-test-simple .tmp";
13
9
log tmpfile;
14
10
let str frood = "A hoopy frood who really knows where his towel is." ;
15
11
log frood;
16
12
{
17
- let io:: writer out = io:: file_writer ( tmpfile, [ io:: create] ) ;
13
+ let io:: writer out = io:: file_writer ( tmpfile, [ io:: create,
14
+ io:: truncate] ) ;
18
15
out. write_str ( frood) ;
19
16
}
20
17
let io:: reader inp = io:: file_reader ( tmpfile) ;
@@ -23,4 +20,6 @@ fn test_simple(str tmpfilebase) {
23
20
assert ( str:: eq ( frood, frood2) ) ;
24
21
}
25
22
26
- fn main ( vec[ str] argv ) { test_simple ( argv. ( 0 ) ) ; }
23
+ fn main ( ) {
24
+ test_simple ( ) ;
25
+ }
You can’t perform that action at this time.
0 commit comments