test: simplify stream buffering
test: add stderr stream test