Skip to content

Commit

Permalink
Remove 7.2-7.3 Regression Test now that versions are no longer supported
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinGrote committed Dec 6, 2024
1 parent 11d9a2f commit c9b2288
Showing 1 changed file with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1057,44 +1057,6 @@ public async Task CanSendCompletionAndCompletionResolveRequestAsync()
Assert.Contains("Writes customized output to a host", updatedCompletionItem.Documentation.String);
}

// Regression test for https://github.com/PowerShell/PowerShellEditorServices/issues/1926
[SkippableFact]
public async Task CanRequestCompletionsAndHandleExceptions()
{
PowerShellVersion details
= await PsesLanguageClient
.SendRequest("powerShell/getVersion", new GetVersionParams())
.Returning<PowerShellVersion>(CancellationToken.None);

Skip.IfNot(details.Version.StartsWith("7.2") || details.Version.StartsWith("7.3"),
"This is a bug in PowerShell 7.2 and 7.3, fixed in 7.4");

string filePath = NewTestFile(@"
@() | ForEach-Object {
if ($false) {
return
}
@{key=$}
}");

Messages.Clear(); // On some systems there's a warning message about configuration items too.
CompletionList completionItems = await PsesLanguageClient.TextDocument.RequestCompletion(
new CompletionParams
{
TextDocument = new TextDocumentIdentifier
{
Uri = DocumentUri.FromFileSystemPath(filePath)
},
Position = new Position(line: 6, character: 11)
});

Assert.Empty(completionItems);
Assert.Collection(Messages,
(message) => Assert.Contains("Error Occurred in TabExpansion2", message.Message),
(message) => Assert.Contains("Exception occurred while running handling completion request", message.Message));
}

[SkippableFact(Skip = "Completion for Expand-SlowArchive is flaky.")]
public async Task CanSendCompletionResolveWithModulePrefixRequestAsync()
{
Expand Down

0 comments on commit c9b2288

Please sign in to comment.