mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Make sure both stdout and stderr can be redirected from a native executable (#20997)
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user