3572: Add test for completion of unresolved items r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-03-13 08:36:38 +00:00 committed by GitHub
commit 56590097ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -867,4 +867,38 @@ mod tests {
"###
);
}
#[test]
fn completes_unresolved_uses() {
assert_debug_snapshot!(
do_reference_completion(
r"
use spam::Quux;
fn main() {
<|>
}
"
),
@r###"
[
CompletionItem {
label: "Quux",
source_range: [82; 82),
delete: [82; 82),
insert: "Quux",
},
CompletionItem {
label: "main()",
source_range: [82; 82),
delete: [82; 82),
insert: "main()$0",
kind: Function,
lookup: "main",
detail: "fn main()",
},
]
"###
);
}
}