Add tests on exit code