Add a test for chaining more than 2 native commands in pipeline (#4012)

This commit is contained in:
Dongbo Wang
2017-06-14 16:50:18 -07:00
committed by GitHub
parent 578f9e5e8b
commit 440590ef8a
@@ -1,4 +1,4 @@
Describe 'native commands lifecycle' -tags 'Feature' {
Describe 'native commands with pipeline' -tags 'Feature' {
BeforeAll {
$powershell = Join-Path -Path $PsHome -ChildPath "powershell"
@@ -23,6 +23,17 @@ Describe 'native commands lifecycle' -tags 'Feature' {
$ps.Stop()
$rs.ResetRunspaceState()
}
It "native | native | native should work fine" {
if ($IsWindows) {
$result = @(ping.exe | findstr.exe count | findstr.exe ping)
$result[0] | Should Match "Usage: ping"
} else {
$result = @(ps aux | grep powershell | grep -v grep)
$result[0] | Should Match "powershell"
}
}
}
Describe "Native Command Processor" -tags "Feature" {