From 5928a46812aa108d7388e5ad3ed0c9aa4b6d5a61 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 19 Jun 2017 00:54:11 +1000 Subject: tests/test-suite: Fix checkpanic --- tests/test-suite/api.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/test-suite/api.js') diff --git a/tests/test-suite/api.js b/tests/test-suite/api.js index a4fce37..8b59e9c 100644 --- a/tests/test-suite/api.js +++ b/tests/test-suite/api.js @@ -757,8 +757,7 @@ test("[test-suite] api: testing lua_to...", function (t) { }, "Lua program ran without error"); }); -// TODO: longjmp ? -test("[test-suite] api: testing panic function", { skip: true }, function (t) { +test("[test-suite] api: testing panic function", function (t) { let luaCode = ` do -- trivial error @@ -776,10 +775,12 @@ test("[test-suite] api: testing panic function", { skip: true }, function (t) { "bad argument #4 (string expected, got no value)") + --[[ TODO: T.totalmem -- memory error T.totalmem(T.totalmem()+10000) -- set low memory limit (+10k) assert(T.checkpanic("newuserdata 20000") == "not enough memory") T.totalmem(0) -- restore high limit + ]] -- stack error if not _soft then @@ -804,7 +805,7 @@ test("[test-suite] api: testing panic function", { skip: true }, function (t) { ltests.luaopen_tests(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(prefix + luaCode)); + lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); }, "Lua program loaded without error"); -- cgit v1.2.3-54-g00ecf