Improve test_no_completions_required test

This commit is contained in:
Igor Aleksanov 2020-10-17 10:47:35 +03:00
parent 70157f07d9
commit 6ae4c70a0a

View file

@ -233,12 +233,28 @@ mod tests {
#[test]
fn test_no_completions_required() {
// There must be no hint for 'in' keyword.
check_no_completion(
r#"
fn foo() {
for i i<|>
}
"#,
)
);
// After 'in' keyword hints may be spawned.
check_detail_and_documentation(
r#"
/// Do the foo
fn foo() -> &'static str { "foo" }
fn bar() {
for c in fo<|>
}
"#,
DetailAndDocumentation {
detail: "fn foo() -> &'static str",
documentation: "Do the foo",
},
);
}
}