aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-03-08 00:51:44 -0700
committerbors-servo <metajack+bors@gmail.com>2015-03-08 00:51:44 -0700
commite404cf37633d809a696f3defddd8c871fdc951bf (patch)
tree1d707980474c63bfbce2c54cb6a3778be2996928
parente8ea41658111cccc0cd2b4fd85e511750f907daa (diff)
parent20cb2c395d7af1dc60401878368ce09a0966119d (diff)
downloadservo-e404cf37633d809a696f3defddd8c871fdc951bf.tar.gz
servo-e404cf37633d809a696f3defddd8c871fdc951bf.zip
auto merge of #5174 : ehegnes/servo/issue-5159, r=Manishearth
Fix warnings and introduce usage of `std::env` over deprecated `std::os` functions.
-rw-r--r--tests/contenttest.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/contenttest.rs b/tests/contenttest.rs
index 7c79401e27a..9fba495834b 100644
--- a/tests/contenttest.rs
+++ b/tests/contenttest.rs
@@ -7,13 +7,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![feature(collections, core, io, os, path, rustc_private, std_misc, test)]
+
extern crate getopts;
extern crate test;
use test::{AutoColor, TestOpts, run_tests_console, TestDesc, TestDescAndFn, DynTestFn, DynTestName};
use test::ShouldFail;
use getopts::{getopts, reqopt};
-use std::{os, str};
+use std::{os, str, env};
use std::old_io::fs;
use std::old_io::Reader;
use std::old_io::process::{Command, Ignored, CreatePipe, InheritFd, ExitStatus};
@@ -27,13 +29,13 @@ struct Config {
}
fn main() {
- let args = os::args();
- let config = parse_config(args.into_iter().collect());
+ let args = env::args();
+ let config = parse_config(args.map(|x| x.into_string().unwrap()).collect());
let opts = test_options(config.clone());
let tests = find_tests(config);
match run_tests_console(&opts, tests) {
- Ok(false) => os::set_exit_status(1), // tests failed
- Err(_) => os::set_exit_status(2), // I/O-related failure
+ Ok(false) => env::set_exit_status(1), // tests failed
+ Err(_) => env::set_exit_status(2), // I/O-related failure
_ => (),
}
}