support fixing >1 test failure from within Teliva

This bug was caused by me forgetting that lua_setglobal affects the
stack.
This commit is contained in:
Kartik K. Agaram 2022-03-10 09:47:10 -08:00
parent 7030e70ef3
commit 0fa83e1d94
1 changed files with 2 additions and 0 deletions

View File

@ -1230,6 +1230,8 @@ static int run_tests(lua_State* L) {
lua_pop(L, 1);
if (first_failure_clear)
lua_setglobal(L, "teliva_first_failure");
else
lua_pop(L, 1);
}
lua_pushnil(L); /* just to undo loop update */
}