From 440590ef8a2150cd6b2069d6dcd93bb4fa1ae057 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 14 Jun 2017 16:50:18 -0700 Subject: [PATCH] Add a test for chaining more than 2 native commands in pipeline (#4012) --- .../NativeCommandProcessor.Tests.ps1 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 b/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 index 8aa219d1fb..5fe1afab68 100644 --- a/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 +++ b/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 @@ -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" {