aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-02-09 15:29:15 +0000
committerAleksey Kladov <[email protected]>2021-02-09 15:29:15 +0000
commit9ea2c96ddd0ad8c8898f1c65667a57a78ba2218c (patch)
tree82da8d800394354eda55deaf439c788b2b4b115f
parentef8f38efc658270d55f438fc1a23c355ee0f4481 (diff)
restore accidentally deleted test
-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}