1
Fork 0

Allow custom filenames for anonymous inputs

This commit is contained in:
mitaa 2016-03-10 04:49:40 +01:00
parent cc62db802f
commit ea7cf904b0
8 changed files with 32 additions and 19 deletions

View file

@ -182,7 +182,10 @@ fn runtest(test: &str, cratename: &str, cfgs: Vec<String>, libs: SearchPaths,
// the test harness wants its own `main` & top level functions, so
// never wrap the test in `fn main() { ... }`
let test = maketest(test, Some(cratename), as_test_harness, opts);
let input = config::Input::Str(test.to_string());
let input = config::Input::Str {
name: driver::anon_src(),
input: test.to_owned(),
};
let mut outputs = HashMap::new();
outputs.insert(OutputType::Exe, None);