Add test for completion of unresolved items

This commit is contained in:
Aleksey Kladov 2020-03-13 09:29:16 +01:00
parent 2f9f409538
commit 9297f4d991

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()",
},
]
"###
);
}
}