PowerShell/test/powershell/Host/Read-Host.Tests.ps1
Steve Lee 2cc091115b Rename powershell.exe to pwsh.exe (#5101)
- Rename powershell.exe to pwsh.exe
- Fixe appveyor.psm1
- Update MSI to include 'pwsh' in path and app paths
- Revert change for hyper-v powershell direct
- Update names in packaging.psm1.
- Fix check for SxS
2017-10-17 17:25:11 -07:00

21 lines
734 B
PowerShell

Describe "Read-Host" -Tags "Slow","Feature" {
Context "[Console]::ReadKey() implementation on non-Windows" {
BeforeAll {
$powershell = Join-Path -Path $PsHome -ChildPath "pwsh"
$assetsDir = Join-Path -Path $PSScriptRoot -ChildPath assets
if ($IsWindows) {
$ItArgs = @{ skip = $true }
} elseif (-not (Get-Command expect -ErrorAction Ignore)) {
$ItArgs = @{ pending = $true }
} else {
$ItArgs = @{ }
}
}
It @ItArgs "Should output correctly" {
& (Join-Path $assetsDir "Read-Host.Output.expect") $powershell | Out-Null
$LASTEXITCODE | Should Be 0
}
}
}