Skip to content

Commit 48483a1

Browse files
committed
Fix LSP test to accommodate expanded keyword completions
The upstream merge added 10 new VCL-total keywords to completions (GROUP BY, ORDER BY, HAVING, LIMIT, OFFSET, EFFECTS, PROOF ATTACHED, AT VERSION, CONSUME AFTER, USAGE LIMIT). Update the test assertion to check that all items are keywords rather than hardcoding the count. https://claude.ai/code/session_01FxxUVqL8xdA34j7n3Ep52S
1 parent cd504b3 commit 48483a1

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/interface/lsp/src/lib.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,16 @@ mod tests {
487487
let lsp = VqlutLsp::new();
488488
let result = lsp.handle_completion(make_completion_params(0, 0));
489489
if let Some(CompletionResponse::Array(items)) = result {
490-
assert_eq!(
491-
items.len(),
492-
3,
493-
"without schema, only 3 keywords expected, got {}",
494-
items.len()
490+
// All items should be keywords (no schema tables/columns).
491+
assert!(
492+
items
493+
.iter()
494+
.all(|i| i.kind == Some(CompletionItemKind::KEYWORD)),
495+
"without schema, all items should be keywords"
496+
);
497+
assert!(
498+
!items.is_empty(),
499+
"should return at least some keyword completions"
495500
);
496501
}
497502
}

0 commit comments

Comments
 (0)