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-02 23:31:12 -07:00
|
|
|
|
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
|
|
|
}
|