diff options
Diffstat (limited to 'tests/test-suite')
-rw-r--r-- | tests/test-suite/ltests.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test-suite/ltests.js b/tests/test-suite/ltests.js index 9f10369..4d53053 100644 --- a/tests/test-suite/ltests.js +++ b/tests/test-suite/ltests.js @@ -103,9 +103,8 @@ const ops = "+-*%^/\\&|~<>_!".split('').map(e => e.charCodeAt(0)); const runJS = function(L, L1, pc) { let buff = []; - let status = 0; - assert(pc.script); - if (!pc || pc.script.length === 0) return lauxlib.luaL_error(L, "attempt to runJS empty script"); + let status = 0; + if (!pc || !pc.script) return lauxlib.luaL_error(L, lua.to_luastring("attempt to runJS null script")); for (;;) { let inst = lua.to_jsstring(getstring(L, buff, pc)); if (inst.length === 0) return 0; |