From ca698a0b8c78e5ba7738fc0f0f6f77718e70a83e Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 11 Sep 2020 14:16:15 +0300 Subject: Adjust the test comment --- crates/ide/src/completion/complete_mod.rs | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'crates/ide/src') diff --git a/crates/ide/src/completion/complete_mod.rs b/crates/ide/src/completion/complete_mod.rs index 7dbf4aee4..3cfc2e131 100644 --- a/crates/ide/src/completion/complete_mod.rs +++ b/crates/ide/src/completion/complete_mod.rs @@ -277,18 +277,25 @@ mod tests { ); } - // FIXME binart modules are not picked up in tests + // FIXME binary modules are not supported in tests properly + // Binary modules are a bit special, they allow importing the modules from `/src/bin` + // and that's why are good to test two things: + // * no cycles are allowed in mod declarations + // * no modules from the parent directory are proposed + // Unfortunately, binary modules support is in cargo not rustc, + // hence the test does not work now + // // #[test] // fn regular_bin_module_completion() { // check( // r#" - // //- /src/main.rs + // //- /src/bin.rs // fn main() {} - // //- /src/main/foo.rs + // //- /src/bin/foo.rs // mod <|> - // //- /src/main/bar.rs + // //- /src/bin/bar.rs // fn bar() {} - // //- /src/main/bar/bar_ignored.rs + // //- /src/bin/bar/bar_ignored.rs // fn bar_ignored() {} // "#, // expect![[r#" @@ -301,14 +308,14 @@ mod tests { fn already_declared_bin_module_completion_omitted() { check( r#" - //- /src/main.rs + //- /src/bin.rs fn main() {} - //- /src/main/foo.rs + //- /src/bin/foo.rs mod <|> - //- /src/main/bar.rs + //- /src/bin/bar.rs mod foo; fn bar() {} - //- /src/main/bar/bar_ignored.rs + //- /src/bin/bar/bar_ignored.rs fn bar_ignored() {} "#, expect![[r#""#]], -- cgit v1.2.3