Skip to content

Commit eeaaf1e

Browse files
committed
completion: update test
1 parent c47e159 commit eeaaf1e

File tree

1 file changed

+10
-1
lines changed
  • crates/emmylua_ls/src/handlers/completion/test

1 file changed

+10
-1
lines changed

crates/emmylua_ls/src/handlers/completion/test/mod.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@ impl CompletionVirtualWorkspace {
106106
&mut self,
107107
block_str: &str,
108108
expect: Vec<VirtualCompletionItem>,
109+
) -> bool {
110+
self.check_completion_with_kind(block_str, expect, CompletionTriggerKind::INVOKED)
111+
}
112+
113+
pub fn check_completion_with_kind(
114+
&mut self,
115+
block_str: &str,
116+
expect: Vec<VirtualCompletionItem>,
117+
trigger_kind: CompletionTriggerKind,
109118
) -> bool {
110119
let content = Self::handle_file_content(block_str);
111120
let Some((content, position)) = content else {
@@ -116,7 +125,7 @@ impl CompletionVirtualWorkspace {
116125
&self.analysis,
117126
file_id,
118127
position,
119-
CompletionTriggerKind::INVOKED,
128+
trigger_kind,
120129
CancellationToken::new(),
121130
);
122131
let Some(result) = result else {

0 commit comments

Comments
 (0)