mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-25 09:35:37 -05:00
Fix to not add parens for global variable built in functions (#940)
This commit is contained in:
@@ -263,6 +263,20 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.LanguageServer
|
||||
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GlobalVariableSystemFunctionsShouldNotHaveParenthesesAdded()
|
||||
{
|
||||
string declarationTitle = "@@CONNECTIONS";
|
||||
string tokenText = "";
|
||||
SqlCompletionItem item = new SqlCompletionItem(declarationTitle, DeclarationType.BuiltInFunction, tokenText);
|
||||
CompletionItem completionItem = item.CreateCompletionItem(0, 1, 2);
|
||||
|
||||
Assert.Equal(declarationTitle, completionItem.Label);
|
||||
Assert.Equal($"{declarationTitle}", completionItem.InsertText);
|
||||
Assert.Equal(declarationTitle, completionItem.Detail);
|
||||
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(DeclarationType.Server)]
|
||||
[InlineData(DeclarationType.Database)]
|
||||
|
||||
Reference in New Issue
Block a user