Skip to content

Commit

Permalink
support fixing >1 test failure from within Teliva
Browse files Browse the repository at this point in the history
This bug was caused by me forgetting that lua_setglobal affects the
stack.
  • Loading branch information
akkartik committed Mar 10, 2022
1 parent 7030e70 commit 0fa83e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/teliva.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
Expand Down

0 comments on commit 0fa83e1

Please sign in to comment.