summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/manual-tests/lua-cli.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/manual-tests/lua-cli.js b/tests/manual-tests/lua-cli.js
index a8f1928..f93f306 100755
--- a/tests/manual-tests/lua-cli.js
+++ b/tests/manual-tests/lua-cli.js
@@ -38,6 +38,15 @@ for (;;) {
status = lua.thread_status.LUA_OK;
}
}
+ while (status === lua.thread_status.LUA_ERRSYNTAX && lapi.lua_tojsstring(L, -1).endsWith("<eof>")) {
+ /* continuation */
+ lapi.lua_pop(L, 1);
+ input += "\n" + readlineSync.prompt({
+ prompt: '>> '
+ });
+ let buffer = lua.to_luastring(input);
+ status = lauxlib.luaL_loadbuffer(L, buffer, buffer.length, stdin);
+ }
if (status !== lua.thread_status.LUA_OK) {
lauxlib.lua_writestringerror(`${lapi.lua_tojsstring(L, -1)}\n`);
lapi.lua_settop(L, 0);