22 * License, v. 2.0. If a copy of the MPL was not distributed with this
33 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44
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 } ;
87use extra:: { tempfile, json} ;
98use extra:: json:: ToJson ;
10- use extra :: test;
9+ use test;
1110
1211use encoding:: label:: encoding_from_whatwg_label;
1312
@@ -17,8 +16,8 @@ use ast::*;
1716
1817fn write_whole_file ( path : & Path , data : & str ) {
1918 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" ) ,
2221 }
2322}
2423
@@ -49,8 +48,8 @@ fn assert_json_eq(results: json::Json, expected: json::Json, message: ~str) {
4948 expected_path. push( "expected.json" ) ;
5049 write_whole_file( & result_path, results) ;
5150 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()]);
5453 });
5554
5655 fail!(message)
0 commit comments