diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 index 89cbd54e366..721ea25c003 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 @@ -15,6 +15,13 @@ Describe "Enter-PSHostProcess tests" -Tag Feature { $si.FileName = "powershell" $powershell = [System.Diagnostics.Process]::Start($si) } + + if ($env:AppVeyor) { + $IsAppveyor = $true + } + else { + $IsAppveyor = $false + } } AfterAll { @@ -25,11 +32,13 @@ Describe "Enter-PSHostProcess tests" -Tag Feature { } } - It "Can enter and exit another PSHost" { + # Skip on Appveyor due to PSReadline issue. + It "Can enter and exit another PSHost" -Skip:$IsAppVeyor { "enter-pshostprocess -id $($pwsh.Id)`n`$pid`nexit-pshostprocess" | pwsh -c - | Should -Be $pwsh.Id } - It "Can enter and exit another Windows PowerShell PSHost" -Skip:(!$IsWindows) { + # Skip on Appveyor due to PSReadline issue. + It "Can enter and exit another Windows PowerShell PSHost" -Skip:(!$IsWindows -or $IsAppVeyor) { "enter-pshostprocess -id $($powershell.Id)`n`$pid`nexit-pshostprocess" | pwsh -c - | Should -Be $powershell.Id }