From 0fa83e1d94055d73fb656cf1db44f1937c7bec2a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 10 Mar 2022 09:47:10 -0800 Subject: support fixing >1 test failure from within Teliva This bug was caused by me forgetting that lua_setglobal affects the stack. --- src/teliva.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/teliva.c b/src/teliva.c index 65f2acc..50ab015 100644 --- a/src/teliva.c +++ b/src/teliva.c @@ -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 */ } -- cgit 1.4.1-2-gfad0