@@ -267,7 +267,7 @@ fn run_debuginfo_test(config: config, props: TestProps, testfile: &Path) {
267
267
// check if each line in props.check_lines appears in the
268
268
// output (in order)
269
269
let mut i = 0 u;
270
- for str:: lines_each ( ProcRes . stdout) |line| {
270
+ for str:: each_line ( ProcRes . stdout) |line| {
271
271
if props. check_lines [ i] . trim ( ) == line. trim ( ) {
272
272
i += 1 u;
273
273
}
@@ -297,7 +297,7 @@ fn check_error_patterns(props: TestProps,
297
297
let mut next_err_idx = 0 u;
298
298
let mut next_err_pat = props. error_patterns [ next_err_idx] ;
299
299
let mut done = false ;
300
- for str:: lines_each ( ProcRes . stderr) |line| {
300
+ for str:: each_line ( ProcRes . stderr) |line| {
301
301
if str:: contains ( line, next_err_pat) {
302
302
debug ! ( "found error pattern %s" , next_err_pat) ;
303
303
next_err_idx += 1 u;
@@ -347,7 +347,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
347
347
// filename:line1:col1: line2:col2: *warning:* msg
348
348
// where line1:col1: is the starting point, line2:col2:
349
349
// is the ending point, and * represents ANSI color codes.
350
- for str:: lines_each ( ProcRes . stderr) |line| {
350
+ for str:: each_line ( ProcRes . stderr) |line| {
351
351
let mut was_expected = false ;
352
352
for vec:: eachi( expected_errors) |i, ee| {
353
353
if !found_flags[ i] {
@@ -596,8 +596,12 @@ fn split_maybe_args(argstr: Option<~str>) -> ~[~str] {
596
596
}
597
597
598
598
match argstr {
599
- Some ( s) => rm_whitespace ( str:: split_char ( s, ' ' ) ) ,
600
- None => ~[ ]
599
+ Some ( s) => {
600
+ let mut ss = ~[ ] ;
601
+ for str:: each_split_char( s, ' ' ) |s| { ss. push ( s. to_owned ( ) ) }
602
+ rm_whitespace ( ss)
603
+ }
604
+ None => ~[ ]
601
605
}
602
606
}
603
607
0 commit comments