test case for formatted stream output