ui tests: Remap test base directory by default.

This commit is contained in:
Tim Neumann 2023-01-06 11:49:07 +00:00
parent 10fe7bfc73
commit cd1d0bc20c
13 changed files with 52 additions and 53 deletions

View file

@ -278,6 +278,9 @@ impl TestProps {
/// `//[foo]`), then the property is ignored unless `cfg` is
/// `Some("foo")`.
fn load_from(&mut self, testfile: &Path, cfg: Option<&str>, config: &Config) {
// Mode-dependent defaults.
self.remap_src_base = config.mode == Mode::Ui && !config.suite.contains("rustdoc");
let mut has_edition = false;
if !testfile.is_dir() {
let file = File::open(testfile).unwrap();