diff --git a/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs b/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs index e867b01a1..91704bd84 100644 --- a/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs +++ b/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs @@ -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); @@ -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); diff --git a/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj b/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj index 2ea39d3fd..3f110f212 100644 --- a/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj +++ b/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj @@ -1,5 +1,6 @@ - + net8.0 @@ -18,8 +19,10 @@ - - + + @@ -37,4 +40,11 @@ + + + + + + diff --git a/test/PowerShellEditorServices.Test.Shared/PSHelp/Microsoft.PowerShell.Utility_1da87e53-152b-403e-98dc-74d7b4d63d59_HelpInfo.xml b/test/PowerShellEditorServices.Test.Shared/PSHelp/Microsoft.PowerShell.Utility_1da87e53-152b-403e-98dc-74d7b4d63d59_HelpInfo.xml new file mode 100644 index 000000000..1b6473db8 --- /dev/null +++ b/test/PowerShellEditorServices.Test.Shared/PSHelp/Microsoft.PowerShell.Utility_1da87e53-152b-403e-98dc-74d7b4d63d59_HelpInfo.xml @@ -0,0 +1,10 @@ + + + https://aka.ms/powershell51-help + + + en-US + 5.2.0.0 + + + \ No newline at end of file diff --git a/test/PowerShellEditorServices.Test.Shared/PSHelp/Microsoft.PowerShell.Utility_1da87e53-152b-403e-98dc-74d7b4d63d59_en-US_HelpContent.cab b/test/PowerShellEditorServices.Test.Shared/PSHelp/Microsoft.PowerShell.Utility_1da87e53-152b-403e-98dc-74d7b4d63d59_en-US_HelpContent.cab new file mode 100644 index 000000000..7c4175b2e Binary files /dev/null and b/test/PowerShellEditorServices.Test.Shared/PSHelp/Microsoft.PowerShell.Utility_1da87e53-152b-403e-98dc-74d7b4d63d59_en-US_HelpContent.cab differ diff --git a/test/PowerShellEditorServices.Test.Shared/PSHelp/README b/test/PowerShellEditorServices.Test.Shared/PSHelp/README new file mode 100644 index 000000000..57c3e6007 --- /dev/null +++ b/test/PowerShellEditorServices.Test.Shared/PSHelp/README @@ -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.