Browse Source

* Properly handle stdout for redir

Michaël Van Canneyt 1 year ago
parent
commit
d45556666e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      tests/utils/redir.pp

+ 4 - 1
tests/utils/redir.pp

@@ -810,7 +810,10 @@ begin
     P.CommandLine:=Progname + ' ' + ComLine;
     P.InputDescriptor.FileName:=RedirStdIn;
     P.OutputDescriptor.FileName:=RedirStdOut;
-    P.ErrorDescriptor.FileName:=RedirStdErr;
+    if RedirStdErr='stdout' then
+      P.Options:=P.options+[poStdErrToOutput]
+    else  
+      P.ErrorDescriptor.FileName:=RedirStdErr;
     P.Execute;
     Result:=P.WaitOnExit(max_count);
     if Result then