Add tests for main.