aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/parent_module.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ide/src/parent_module.rs b/crates/ide/src/parent_module.rs
index 7b08bc27b..ddbaf22b7 100644
--- a/crates/ide/src/parent_module.rs
+++ b/crates/ide/src/parent_module.rs
@@ -120,4 +120,17 @@ mod foo {
120"#, 120"#,
121 ); 121 );
122 } 122 }
123
124 #[test]
125 fn test_resolve_crate_root() {
126 let (analysis, file_id) = fixture::file(
127 r#"
128//- /main.rs
129mod foo;
130//- /foo.rs
131$0
132"#,
133 );
134 assert_eq!(analysis.crate_for(file_id).unwrap().len(), 1);
135 }
123} 136}