extern crate compiletest_rs as ct;
use std::env;
fn run_mode(src: &'static str, mode: &'static str) {
let mut config = ct::Config::default();
config.mode = mode.parse().expect("invalid mode");
config.target_rustcflags = Some("-L ../../target/debug/deps".to_owned());
if let Ok(name) = env::var("TESTNAME") {
config.filter = Some(name);
}
config.src_base = format!("tests/{}", src).into();
config.clean_rmeta();
ct::run_tests(&config);
}
#[test]
#[ignore] fn compile_test() {
run_mode("compile-fail", "compile-fail");
}