diff options
author | Aleksey Kladov <[email protected]> | 2021-02-09 15:29:15 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-02-09 15:29:15 +0000 |
commit | 9ea2c96ddd0ad8c8898f1c65667a57a78ba2218c (patch) | |
tree | 82da8d800394354eda55deaf439c788b2b4b115f | |
parent | ef8f38efc658270d55f438fc1a23c355ee0f4481 (diff) |
restore accidentally deleted test
-rw-r--r-- | crates/ide/src/parent_module.rs | 13 |
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 | ||
129 | mod foo; | ||
130 | //- /foo.rs | ||
131 | $0 | ||
132 | "#, | ||
133 | ); | ||
134 | assert_eq!(analysis.crate_for(file_id).unwrap().len(), 1); | ||
135 | } | ||
123 | } | 136 | } |