Test output buffering