From f27dfea065afc8f55af4821c8285fd5f3cb88da2 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Tue, 20 Nov 2018 10:17:33 -0800 Subject: [PATCH] Skip `Enter-PSHostProcess` tests on Appveyor due to PSReadline issue (#8317) --- .../Enter-PSHostProcess.Tests.ps1 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 89cbd54e36..721ea25c00 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 }