From d2d7a4403cad6913a1944cbe4aaedc6c8b936382 Mon Sep 17 00:00:00 2001 From: James Leitch Date: Sun, 1 Nov 2020 17:20:55 -0700 Subject: Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot. --- crates/test_utils/src/fixture.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/test_utils/src') diff --git a/crates/test_utils/src/fixture.rs b/crates/test_utils/src/fixture.rs index e40b61a94..806ab06c1 100644 --- a/crates/test_utils/src/fixture.rs +++ b/crates/test_utils/src/fixture.rs @@ -8,6 +8,7 @@ use stdx::{lines_with_ends, split_once, trim_indent}; pub struct Fixture { pub path: String, pub text: String, + pub explicit_root: bool, pub krate: Option, pub deps: Vec, pub cfg_atoms: Vec, @@ -64,6 +65,7 @@ impl Fixture { let path = components[0].to_string(); assert!(path.starts_with('/')); + let mut explicit_root = false; let mut krate = None; let mut deps = Vec::new(); let mut edition = None; @@ -73,6 +75,7 @@ impl Fixture { for component in components[1..].iter() { let (key, value) = split_once(component, ':').unwrap(); match key { + "root" => explicit_root = true, "crate" => krate = Some(value.to_string()), "deps" => deps = value.split(',').map(|it| it.to_string()).collect(), "edition" => edition = Some(value.to_string()), @@ -98,6 +101,7 @@ impl Fixture { Fixture { path, text: String::new(), + explicit_root: explicit_root, krate: krate, deps, cfg_atoms, -- cgit v1.2.3