aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorIgor Aleksanov <[email protected]>2020-10-17 08:47:35 +0100
committerIgor Aleksanov <[email protected]>2020-10-17 08:47:35 +0100
commit6ae4c70a0aecea4c7c0c5a43fe443baa170ff1d4 (patch)
treedcd1c034971f47eaffb4711d7052d0d88892881e /crates
parent70157f07d9a33e4b8ed71e162218a793f44a7691 (diff)
Improve test_no_completions_required test
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/completion.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/crates/ide/src/completion.rs b/crates/ide/src/completion.rs
index 570091ba3..69e875014 100644
--- a/crates/ide/src/completion.rs
+++ b/crates/ide/src/completion.rs
@@ -233,12 +233,28 @@ mod tests {
233 233
234 #[test] 234 #[test]
235 fn test_no_completions_required() { 235 fn test_no_completions_required() {
236 // There must be no hint for 'in' keyword.
236 check_no_completion( 237 check_no_completion(
237 r#" 238 r#"
238 fn foo() { 239 fn foo() {
239 for i i<|> 240 for i i<|>
240 } 241 }
241 "#, 242 "#,
242 ) 243 );
244 // After 'in' keyword hints may be spawned.
245 check_detail_and_documentation(
246 r#"
247 /// Do the foo
248 fn foo() -> &'static str { "foo" }
249
250 fn bar() {
251 for c in fo<|>
252 }
253 "#,
254 DetailAndDocumentation {
255 detail: "fn foo() -> &'static str",
256 documentation: "Do the foo",
257 },
258 );
243 } 259 }
244} 260}