Skip to content

Commit

Permalink
Enable completion tests skipped on Windows PowerShell
Browse files Browse the repository at this point in the history
They're probably just empty now.
  • Loading branch information
andyleejordan committed Oct 21, 2022
1 parent 3f22ad4 commit ade9d58
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,34 +71,36 @@ public async Task CompletesCommandFromModule()
Assert.StartsWith(CompleteCommandFromModule.GetRandomDetail, actual.Detail);
}

[SkippableFact]
[Fact]
public async Task CompletesTypeName()
{
Skip.If(VersionUtils.PSEdition == "Desktop", "Windows PowerShell has trouble with this test right now.");
(_, IEnumerable<CompletionItem> results) = await GetCompletionResultsAsync(CompleteTypeName.SourceDetails).ConfigureAwait(true);
CompletionItem actual = Assert.Single(results);
if (VersionUtils.IsNetCore)
{
CompletionItem actual = Assert.Single(results);
Assert.Equal(CompleteTypeName.ExpectedCompletion, actual);
}
else
{
// Windows PowerShell shows ArrayList as a Class.
Assert.Equal(CompleteTypeName.ExpectedCompletion with
{
Kind = CompletionItemKind.Class,
Detail = "System.Collections.ArrayList"
}, actual);
// Windows PowerShell no longer retrieves this completion.
Assert.Empty(results);
}
}

[SkippableFact]
[Fact]
public async Task CompletesNamespace()
{
Skip.If(VersionUtils.PSEdition == "Desktop", "Windows PowerShell has trouble with this test right now.");
(_, IEnumerable<CompletionItem> results) = await GetCompletionResultsAsync(CompleteNamespace.SourceDetails).ConfigureAwait(true);
CompletionItem actual = Assert.Single(results);
Assert.Equal(CompleteNamespace.ExpectedCompletion, actual);
if (VersionUtils.IsNetCore)
{
CompletionItem actual = Assert.Single(results);
Assert.Equal(CompleteNamespace.ExpectedCompletion, actual);
}
else
{
// Windows PowerShell no longer retrieves this completion.
Assert.Empty(results);
}
}

[Fact]
Expand Down

0 comments on commit ade9d58

Please sign in to comment.