Make sure both stdout and stderr can be redirected from a native executable (#20997)

This commit is contained in:
Patrick Meinecke
2024-03-14 11:42:30 -07:00
committed by GitHub
parent d67a82d833
commit 4faf52726d
3 changed files with 44 additions and 30 deletions
@@ -213,6 +213,12 @@ Describe "Native Command Processor" -tags "Feature" {
Wait-UntilTrue -sb { (Get-Process mmc).Count -gt 0 } -TimeoutInMilliseconds 5000 -IntervalInMilliseconds 1000 | Should -BeTrue
Get-Process mmc | Stop-Process
}
It 'Can redirect stdout and stderr to different files' {
testexe -stderrandout testing > $TestDrive/stdout.txt 2> $TestDrive/stderr.txt
Get-Content $TestDrive/stdout.txt | Should -Be testing
Get-Content $TestDrive/stderr.txt | Should -Be gnitset
}
}
Describe "Open a text file with NativeCommandProcessor" -tags @("Feature", "RequireAdminOnWindows") {