Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}

Expand Down