2
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
4
5
- use std:: { str, run, task} ;
6
- use std:: io;
7
- use std:: io:: { File , Writer } ;
5
+ use std:: { io, str, task} ;
6
+ use std:: io:: { File , Process , Writer } ;
8
7
use extra:: { tempfile, json} ;
9
8
use extra:: json:: ToJson ;
10
- use extra :: test;
9
+ use test;
11
10
12
11
use encoding:: label:: encoding_from_whatwg_label;
13
12
@@ -17,8 +16,8 @@ use ast::*;
17
16
18
17
fn write_whole_file ( path : & Path , data : & str ) {
19
18
match File :: open_mode ( path, io:: Open , io:: Write ) {
20
- Some ( mut writer) => writer. write ( data. as_bytes ( ) ) ,
21
- None => fail ! ( "could not open file" ) ,
19
+ Ok ( mut writer) => { writer. write ( data. as_bytes ( ) ) ; } ,
20
+ _ => fail ! ( "could not open file" ) ,
22
21
}
23
22
}
24
23
@@ -49,8 +48,8 @@ fn assert_json_eq(results: json::Json, expected: json::Json, message: ~str) {
49
48
expected_path. push( "expected.json" ) ;
50
49
write_whole_file( & result_path, results) ;
51
50
write_whole_file( & expected_path, expected) ;
52
- run :: process_status ( "colordiff" , [ ~"-u1000", result_path.display().to_str(),
53
- expected_path.display().to_str()]);
51
+ Process :: status ( "colordiff" , [ ~"-u1000", result_path.display().to_str(),
52
+ expected_path.display().to_str()]);
54
53
});
55
54
56
55
fail!(message)
0 commit comments