Skip to content

Commit 7fdef20

Browse files
committed
Enable skipped Windows PowerShell completion tests
1 parent d2038e8 commit 7fdef20

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs

+15-11
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,30 @@ public async Task CompletesCommandFromModule()
6666
Assert.StartsWith(CompleteCommandFromModule.GetRandomDetail, actual.Detail);
6767
}
6868

69-
[SkippableFact]
69+
[Fact]
7070
public async Task CompletesTypeName()
7171
{
72-
Skip.If(
73-
!VersionUtils.IsNetCore,
74-
"In Windows PowerShell the CommandCompletion fails in the test harness, but works manually.");
75-
7672
IEnumerable<CompletionItem> results = await GetCompletionResultsAsync(CompleteTypeName.SourceDetails).ConfigureAwait(true);
7773
CompletionItem actual = Assert.Single(results);
78-
Assert.Equal(CompleteTypeName.ExpectedCompletion, actual);
74+
if (VersionUtils.IsNetCore)
75+
{
76+
Assert.Equal(CompleteTypeName.ExpectedCompletion, actual);
77+
}
78+
else
79+
{
80+
// Windows PowerShell shows ArrayList as a Class.
81+
Assert.Equal(CompleteTypeName.ExpectedCompletion with
82+
{
83+
Kind = CompletionItemKind.Class,
84+
Detail = "Class System.Collections.ArrayList"
85+
}, actual);
86+
}
7987
}
8088

8189
[Trait("Category", "Completions")]
82-
[SkippableFact]
90+
[Fact]
8391
public async Task CompletesNamespace()
8492
{
85-
Skip.If(
86-
!VersionUtils.IsNetCore,
87-
"In Windows PowerShell the CommandCompletion fails in the test harness, but works manually.");
88-
8993
IEnumerable<CompletionItem> results = await GetCompletionResultsAsync(CompleteNamespace.SourceDetails).ConfigureAwait(true);
9094
CompletionItem actual = Assert.Single(results);
9195
Assert.Equal(CompleteNamespace.ExpectedCompletion, actual);

0 commit comments

Comments
 (0)