diff options
author | daurnimator <quae@daurnimator.com> | 2017-06-19 00:48:20 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-06-19 00:48:20 +1000 |
commit | 098ea04c2a85a15e621269a6f4b38d3a607f47d0 (patch) | |
tree | 655a983676a7bfaa1ab28bb30a04988fc0fdc8bc /tests | |
parent | 17890ef46286773c95106fca1894f72905d3fe06 (diff) | |
download | fengari-098ea04c2a85a15e621269a6f4b38d3a607f47d0.tar.gz fengari-098ea04c2a85a15e621269a6f4b38d3a607f47d0.tar.bz2 fengari-098ea04c2a85a15e621269a6f4b38d3a607f47d0.zip |
tests/test-suite/ltests.js: Don't error on empty scripts (just null ones)
Diffstat (limited to 'tests')
-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; |