merging #2790 issues when stderr/stdout is a pipe - test

this is only the test to demonstrate the issue, it is not the fix