fix TestExitCode

ping @crosbymichael @unclejack