From 098ea04c2a85a15e621269a6f4b38d3a607f47d0 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 19 Jun 2017 00:48:20 +1000 Subject: tests/test-suite/ltests.js: Don't error on empty scripts (just null ones) --- tests/test-suite/ltests.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') 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; -- cgit v1.2.3-70-g09d2