Restore buffered process.PipeOutput and add tests
Created by: mrnugget
This restores the buffered PipeOutput function that I accidentally removed in #31081 because I didn't notice it is used in src-cli.
This adds it back and also adds a tests for both methods so we're sure that they actually do what they say they do.
Test plan
- Added and ran two unit tests, both with
-count=20
to avoid race conditions/flakes - Tests behaviour in src-cli by having
github-proxy
print single characters and runninggo run . run github-proxy
in./dev/sg