mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
19 lines
628 B
PowerShell
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
|
|
}
|
|
}
|