Skip to content

Commit 7f0083c

Browse files
committed
Update Help Offline for completion tests
1 parent a1ae8ae commit 7f0083c

5 files changed

+26
-5
lines changed

test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ await PsesLanguageClient
10381038
"evaluate",
10391039
new EvaluateRequestArguments
10401040
{
1041-
Expression = "Update-Help Microsoft.Powershell.Utility;"
1041+
Expression = $"Update-Help Microsoft.Powershell.Utility -SourcePath {s_binDir};"
10421042
})
10431043
.ReturningVoid(CancellationToken.None);
10441044

@@ -1072,7 +1072,7 @@ await PsesLanguageClient
10721072
"evaluate",
10731073
new EvaluateRequestArguments
10741074
{
1075-
Expression = "Update-Help Microsoft.Powershell.Utility;Import-Module Microsoft.PowerShell.Utility -Prefix Test -Force"
1075+
Expression = $"Update-Help Microsoft.Powershell.Utility -SourcePath {s_binDir};Import-Module Microsoft.PowerShell.Utility -Prefix Test -Force"
10761076
})
10771077
.ReturningVoid(CancellationToken.None);
10781078

test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />
2+
<Import
3+
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />
34

45
<PropertyGroup>
56
<TargetFrameworks>net8.0</TargetFrameworks>
@@ -18,8 +19,10 @@
1819
<Choose>
1920
<When Condition=" '$(LocalOmniSharp)' == 'true' ">
2021
<ItemGroup>
21-
<ProjectReference Include="..\..\..\csharp-language-server-protocol\src\Client\Client.csproj" />
22-
<ProjectReference Include="..\..\..\csharp-language-server-protocol\src\Dap.Client\Dap.client.csproj" />
22+
<ProjectReference
23+
Include="..\..\..\csharp-language-server-protocol\src\Client\Client.csproj" />
24+
<ProjectReference
25+
Include="..\..\..\csharp-language-server-protocol\src\Dap.Client\Dap.client.csproj" />
2326
</ItemGroup>
2427
</When>
2528
<Otherwise>
@@ -37,4 +40,11 @@
3740
<ItemGroup>
3841
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
3942
</ItemGroup>
43+
44+
<ItemGroup>
45+
<!-- Used for Update-Help for some test fixtures -->
46+
<Content Include="..\PowerShellEditorServices.Test.Shared\PSHelp\**\*"
47+
CopyToOutputDirectory="PreserveNewest" />
48+
</ItemGroup>
49+
4050
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<HelpInfo xmlns="http://schemas.microsoft.com/powershell/help/2010/05">
3+
<HelpContentURI>https://aka.ms/powershell51-help</HelpContentURI>
4+
<SupportedUICultures>
5+
<UICulture>
6+
<UICultureName>en-US</UICultureName>
7+
<UICultureVersion>5.2.0.0</UICultureVersion>
8+
</UICulture>
9+
</SupportedUICultures>
10+
</HelpInfo>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Windows PowerShell does not have updated help in CI by default and we utilize a private Azure Devops repo for builds that has no internet access. The completion tests validate the Windows Help so we update it offline from here so these tests can work.

0 commit comments

Comments
 (0)