Add a code to handle finished process correctly on Unix

This commit is contained in:
Sergei Vorobev
2016-11-15 14:49:39 -08:00
parent 9658e62682
commit a6fc5387c2
2 changed files with 39 additions and 5 deletions
@@ -61,6 +61,10 @@ Describe 'piping powershell objects to finished native executable' -Tags 'CI' {
$echoArgs = Join-Path (Split-Path $powershellTestDir) tools/EchoArgs/bin/echoargs
It 'doesn''t throw any exceptions, when we are piping to the closed executable' {
1..3 | % { Start-Sleep -Milliseconds 100; $_ } | & $echoArgs | Should Be $null
1..3 | % {
Start-Sleep -Milliseconds 100
# yeild some multi-line formatted object
@{'a' = 'b'}
} | & $echoArgs | Should Be $null
}
}