mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
Improve test_no_completions_required test
This commit is contained in:
parent
70157f07d9
commit
6ae4c70a0a
1 changed files with 17 additions and 1 deletions
|
@ -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",
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue