Fix the indicator for redirecting standard input (#2749)

This commit is contained in:
Dongbo Wang
2016-11-21 16:02:52 -08:00
committed by Sergei Vorobev
parent 172b2234fc
commit 20a0ba041c
3 changed files with 14 additions and 2 deletions
@@ -15,6 +15,18 @@ Describe "NativeLinuxCommands" -tags "CI" {
It "Should find Application touch" -Skip:$IsWindows {
(get-command touch).CommandType | Should Be Application
}
It "Should not redirect standard input if native command is the first command in pipeline (1)" -Skip:$IsWindows {
stty | ForEach-Object -Begin { $out = @() } -Process { $out += $_ }
$out.Length -gt 0 | Should Be $true
$out[0] -like "speed * baud; line =*" | Should Be $true
}
It "Should not redirect standard input if native command is the first command in pipeline (2)" -Skip:$IsWindows {
$out = stty
$out.Length -gt 0 | Should Be $true
$out[0] -like "speed * baud; line =*" | Should Be $true
}
}
Describe "Scripts with extensions" -tags "CI" {