mirror of
https://github.com/servo/servo.git
synced 2025-09-21 12:20:20 +01:00
Use Vec in contenttest.rs.
This commit is contained in:
parent
0cfd070680
commit
5d3f750d37
1 changed files with 5 additions and 5 deletions
|
@ -26,7 +26,7 @@ struct Config {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let args = os::args();
|
let args = os::args();
|
||||||
let config = parse_config(args);
|
let config = parse_config(args.move_iter().collect());
|
||||||
let opts = test_options(config.clone());
|
let opts = test_options(config.clone());
|
||||||
let tests = find_tests(config);
|
let tests = find_tests(config);
|
||||||
match run_tests_console(&opts, tests) {
|
match run_tests_console(&opts, tests) {
|
||||||
|
@ -36,10 +36,10 @@ fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_config(args: ~[~str]) -> Config {
|
fn parse_config(args: Vec<~str>) -> Config {
|
||||||
let args = args.tail();
|
let args = args.tail();
|
||||||
let opts = ~[reqopt("s", "source-dir", "source-dir", "source-dir")];
|
let opts = vec!(reqopt("s", "source-dir", "source-dir", "source-dir"));
|
||||||
let matches = match getopts(args, opts) {
|
let matches = match getopts(args, opts.as_slice()) {
|
||||||
Ok(m) => m,
|
Ok(m) => m,
|
||||||
Err(f) => fail!(f.to_err_msg())
|
Err(f) => fail!(f.to_err_msg())
|
||||||
};
|
};
|
||||||
|
@ -121,7 +121,7 @@ fn run_test(file: ~str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let out = str::from_utf8(output.as_slice());
|
let out = str::from_utf8(output.as_slice());
|
||||||
let lines: ~[&str] = out.unwrap().split('\n').collect();
|
let lines: Vec<&str> = out.unwrap().split('\n').collect();
|
||||||
for &line in lines.iter() {
|
for &line in lines.iter() {
|
||||||
if line.contains("TEST-UNEXPECTED-FAIL") {
|
if line.contains("TEST-UNEXPECTED-FAIL") {
|
||||||
fail!(line.to_owned());
|
fail!(line.to_owned());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue