Display correct filename with --test option
This commit is contained in:
parent
324b175174
commit
b0803d4aed
3 changed files with 29 additions and 22 deletions
|
@ -18,6 +18,7 @@ use getopts;
|
|||
use testing;
|
||||
use rustc::session::search_paths::SearchPaths;
|
||||
use rustc::session::config::Externs;
|
||||
use syntax::codemap::DUMMY_SP;
|
||||
|
||||
use externalfiles::{ExternalHtml, LoadStringError, load_string};
|
||||
|
||||
|
@ -154,9 +155,8 @@ pub fn test(input: &str, cfgs: Vec<String>, libs: SearchPaths, externs: Externs,
|
|||
let mut opts = TestOptions::default();
|
||||
opts.no_crate_inject = true;
|
||||
let mut collector = Collector::new(input.to_string(), cfgs, libs, externs,
|
||||
true, opts, maybe_sysroot, "input".to_string(),
|
||||
None);
|
||||
find_testable_code(&input_str, &mut collector, 0);
|
||||
true, opts, maybe_sysroot, None);
|
||||
find_testable_code(&input_str, &mut collector, DUMMY_SP);
|
||||
test_args.insert(0, "rustdoctest".to_string());
|
||||
testing::test_main(&test_args, collector.tests);
|
||||
0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue