File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
crates/ide/src/completion Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -277,18 +277,25 @@ mod tests {
277
277
) ;
278
278
}
279
279
280
- // FIXME binart modules are not picked up in tests
280
+ // FIXME binary modules are not supported in tests properly
281
+ // Binary modules are a bit special, they allow importing the modules from `/src/bin`
282
+ // and that's why are good to test two things:
283
+ // * no cycles are allowed in mod declarations
284
+ // * no modules from the parent directory are proposed
285
+ // Unfortunately, binary modules support is in cargo not rustc,
286
+ // hence the test does not work now
287
+ //
281
288
// #[test]
282
289
// fn regular_bin_module_completion() {
283
290
// check(
284
291
// r#"
285
- // //- /src/main .rs
292
+ // //- /src/bin .rs
286
293
// fn main() {}
287
- // //- /src/main /foo.rs
294
+ // //- /src/bin /foo.rs
288
295
// mod <|>
289
- // //- /src/main /bar.rs
296
+ // //- /src/bin /bar.rs
290
297
// fn bar() {}
291
- // //- /src/main /bar/bar_ignored.rs
298
+ // //- /src/bin /bar/bar_ignored.rs
292
299
// fn bar_ignored() {}
293
300
// "#,
294
301
// expect![[r#"
@@ -301,14 +308,14 @@ mod tests {
301
308
fn already_declared_bin_module_completion_omitted ( ) {
302
309
check (
303
310
r#"
304
- //- /src/main .rs
311
+ //- /src/bin .rs
305
312
fn main() {}
306
- //- /src/main /foo.rs
313
+ //- /src/bin /foo.rs
307
314
mod <|>
308
- //- /src/main /bar.rs
315
+ //- /src/bin /bar.rs
309
316
mod foo;
310
317
fn bar() {}
311
- //- /src/main /bar/bar_ignored.rs
318
+ //- /src/bin /bar/bar_ignored.rs
312
319
fn bar_ignored() {}
313
320
"# ,
314
321
expect ! [ [ r#""# ] ] ,
You can’t perform that action at this time.
0 commit comments