Files
PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Write-Host.Tests.ps1
T

18 lines
629 B
PowerShell
Raw Normal View History

2016-07-25 14:01:41 -07:00
Describe "Write-Host DRT Unit Tests" -Tags "CI" {
2016-06-29 14:39:41 -07:00
BeforeAll {
$powershell = Join-Path -Path $PsHome -ChildPath "powershell"
}
2016-05-10 00:33:33 -07:00
$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" }
)
2016-06-29 14:39:41 -07:00
It "write-Host works with '<Name>' switch" -TestCases $testData -Pending:$IsOSX {
param($Command, $returnValue)
2016-06-29 14:39:41 -07:00
& $powershell -noprofile $Command | Should Be $returnValue
2016-05-10 00:33:33 -07:00
}
2016-06-29 14:39:41 -07:00
}