aboutsummaryrefslogtreecommitdiff
path: root/tests/test-suite
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-06 22:19:07 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-06 22:19:07 +1100
commit970dbe61ce2e0c46455a89c8fbc75e6eb783d7c9 (patch)
tree20e884f181a6869b97cbe621586d7b1e992e9609 /tests/test-suite
parent9057e6fd7c36d4aa1ec8425f672d63901f041c20 (diff)
downloadfengari-970dbe61ce2e0c46455a89c8fbc75e6eb783d7c9.tar.gz
fengari-970dbe61ce2e0c46455a89c8fbc75e6eb783d7c9.tar.bz2
fengari-970dbe61ce2e0c46455a89c8fbc75e6eb783d7c9.zip
tests/test-suite/api.js: Split a skipped test
Diffstat (limited to 'tests/test-suite')
-rw-r--r--tests/test-suite/api.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/test-suite/api.js b/tests/test-suite/api.js
index b5f45c3..87f96b3 100644
--- a/tests/test-suite/api.js
+++ b/tests/test-suite/api.js
@@ -1936,13 +1936,35 @@ test("[test-suite] api: testing memory errors when creating a new state", { skip
}, "Lua program ran without error");
});
-test("[test-suite] api: get main thread from registry (at index LUA_RIDX_MAINTHREAD == 1)", { skip: true }, function (t) {
+test("[test-suite] api: get main thread from registry (at index LUA_RIDX_MAINTHREAD == 1)", function (t) {
let luaCode = `
mt = T.testC("rawgeti R 1; return 1")
assert(type(mt) == "thread" and coroutine.running() == mt)
+ `, L;
+
+ t.plan(2);
+ t.doesNotThrow(function () {
+
+ L = lauxlib.luaL_newstate();
+ lualib.luaL_openlibs(L);
+
+ ltests.luaopen_tests(L);
+
+ lauxlib.luaL_loadstring(L, lua.to_luastring(prefix + memprefix + luaCode));
+ }, "Lua program loaded without error");
+
+ t.doesNotThrow(function () {
+
+ lua.lua_call(L, 0, -1);
+
+ }, "Lua program ran without error");
+});
+
+test("[test-suite] api: test thread creation after stressing GC", { skip: true }, function (t) {
+ let luaCode = `
function expand (n,s)
if n==0 then return "" end
local e = string.rep("=", n)