Files
PowerShell-PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Write-Host.Tests.ps1
T
Andrew Schwartzmeyer 2dd01a9d31 Fix Write-Host tests
These were not testing the development build of PowerShell.
2016-07-01 14:36:15 -07:00

19 lines
628 B
PowerShell

Describe "Write-Host DRT Unit Tests" -Tags DRT {
BeforeAll {
$powershell = Join-Path -Path $PsHome -ChildPath "powershell"
}
$testData = @(
@{ Name = 'NoNewline';Command = "Write-Host a,b -Separator ',' -ForegroundColor Yellow -BackgroundColor DarkBlue -NoNewline"; returnValue = "a,b" }
@{ Name = 'Separator';Command = "Write-Host a,b,c -Separator '+'"; returnValue = "a+b+c" }
)
It "write-Host works with '<Name>' switch" -TestCases $testData -Pending:$IsOSX {
param($Command, $returnValue)
& $powershell -noprofile $Command | Should Be $returnValue
}
}