Add tests for diagnostic output