Add single/multi-line console formatting and tests.