powershell-es/test/PowerShellEditorServices.Test.Shared/Completion/CompleteCommandInFile.cs
fwastring baa0056244
Some checks are pending
CI Tests / dotnet (push) Waiting to run
CI Tests / dotnet-1 (push) Waiting to run
CI Tests / dotnet-2 (push) Waiting to run
Emacs End-to-End Tests / ert (push) Waiting to run
Vim End-to-End Tests / themis (push) Waiting to run
initial
2026-02-17 13:06:31 +01:00

40 lines
1.3 KiB
C#

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.PowerShell.EditorServices.Services.TextDocument;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
namespace Microsoft.PowerShell.EditorServices.Test.Shared.Completion
{
internal static class CompleteCommandInFile
{
public static readonly ScriptRegion SourceDetails = new(
file: TestUtilities.NormalizePath("Completion/CompletionExamples.psm1"),
text: string.Empty,
startLineNumber: 8,
startColumnNumber: 10,
startOffset: 0,
endLineNumber: 0,
endColumnNumber: 0,
endOffset: 0);
public static readonly CompletionItem ExpectedCompletion = new()
{
Kind = CompletionItemKind.Function,
Detail = "",
FilterText = "Get-XYZSomething",
InsertText = "Get-XYZSomething",
Label = "Get-XYZSomething",
SortText = "0001Get-XYZSomething",
TextEdit = new TextEdit
{
NewText = "Get-XYZSomething",
Range = new Range
{
Start = new Position { Line = 7, Character = 0 },
End = new Position { Line = 7, Character = 9 }
}
}
};
}
}