PowerShell/test/powershell/Host/Read-Host.Tests.ps1
James Truher a784149b36 all tests are now marked with proper tag
also, update build.psm1 to be more flexible
2016-07-27 12:06:51 -07:00

21 lines
740 B
PowerShell

Describe "Read-Host" -Tags "Slow","Feature" {
Context "[Console]::ReadKey() implementation on non-Windows" {
BeforeAll {
$powershell = Join-Path -Path $PsHome -ChildPath "powershell"
$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
}
}
}