Test writing output to stdout in non_exiting_main().