Merge #6435
6435: Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot. r=matklad a=rickvanprim Updates `module_resolution_relative_path_outside_root` test to check valid paths outside of the root, by moving the root to a subpath so that paths outside of it are possible. If this would be more appropriate as a new test, or if the original check for an invalid path should be left, I'm happy to update. Co-authored-by: James Leitch <rickvanprim@gmail.com>
This commit is contained in:
commit
8ad01d863b
1 changed files with 15 additions and 2 deletions
|
@ -323,13 +323,26 @@ pub struct Baz;
|
|||
fn module_resolution_relative_path_outside_root() {
|
||||
check(
|
||||
r#"
|
||||
//- /main.rs
|
||||
//- /a/b/c/d/e/main.rs crate:main
|
||||
#[path="../../../../../outside.rs"]
|
||||
mod foo;
|
||||
|
||||
//- /outside.rs
|
||||
mod bar;
|
||||
|
||||
//- /bar.rs
|
||||
pub struct Baz;
|
||||
"#,
|
||||
expect![[r#"
|
||||
crate
|
||||
"#]],
|
||||
foo: t
|
||||
|
||||
crate::foo
|
||||
bar: t
|
||||
|
||||
crate::foo::bar
|
||||
Baz: t v
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue