Skip to content

Commit

Permalink
Update Help Offline for completion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinGrote committed Dec 6, 2024
1 parent a1ae8ae commit 7f0083c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ await PsesLanguageClient
"evaluate",
new EvaluateRequestArguments
{
Expression = "Update-Help Microsoft.Powershell.Utility;"
Expression = $"Update-Help Microsoft.Powershell.Utility -SourcePath {s_binDir};"
})
.ReturningVoid(CancellationToken.None);

Expand Down Expand Up @@ -1072,7 +1072,7 @@ await PsesLanguageClient
"evaluate",
new EvaluateRequestArguments
{
Expression = "Update-Help Microsoft.Powershell.Utility;Import-Module Microsoft.PowerShell.Utility -Prefix Test -Force"
Expression = $"Update-Help Microsoft.Powershell.Utility -SourcePath {s_binDir};Import-Module Microsoft.PowerShell.Utility -Prefix Test -Force"
})
.ReturningVoid(CancellationToken.None);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />
<Import
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
Expand All @@ -18,8 +19,10 @@
<Choose>
<When Condition=" '$(LocalOmniSharp)' == 'true' ">
<ItemGroup>
<ProjectReference Include="..\..\..\csharp-language-server-protocol\src\Client\Client.csproj" />
<ProjectReference Include="..\..\..\csharp-language-server-protocol\src\Dap.Client\Dap.client.csproj" />
<ProjectReference
Include="..\..\..\csharp-language-server-protocol\src\Client\Client.csproj" />
<ProjectReference
Include="..\..\..\csharp-language-server-protocol\src\Dap.Client\Dap.client.csproj" />
</ItemGroup>
</When>
<Otherwise>
Expand All @@ -37,4 +40,11 @@
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
<!-- Used for Update-Help for some test fixtures -->
<Content Include="..\PowerShellEditorServices.Test.Shared\PSHelp\**\*"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<HelpInfo xmlns="http://schemas.microsoft.com/powershell/help/2010/05">
<HelpContentURI>https://aka.ms/powershell51-help</HelpContentURI>
<SupportedUICultures>
<UICulture>
<UICultureName>en-US</UICultureName>
<UICultureVersion>5.2.0.0</UICultureVersion>
</UICulture>
</SupportedUICultures>
</HelpInfo>
Binary file not shown.
1 change: 1 addition & 0 deletions test/PowerShellEditorServices.Test.Shared/PSHelp/README
Original file line number Diff line number Diff line change
@@ -0,0 +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 comments on commit 7f0083c

Please sign in to comment.