From 4d374d77766b6f621f2194a9546521295aa528af Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Tue, 11 Apr 2017 10:06:09 +0200 Subject: debug.debug Use readline-sync to read from stdin interactively --- tests/debug-cli.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/debug-cli.js (limited to 'tests') diff --git a/tests/debug-cli.js b/tests/debug-cli.js new file mode 100644 index 0000000..aa6847f --- /dev/null +++ b/tests/debug-cli.js @@ -0,0 +1,19 @@ +"use strict"; + +const lapi = require("../src/lapi.js"); +const lauxlib = require("../src/lauxlib.js"); +const lua = require('../src/lua.js'); +const linit = require('../src/linit.js'); + +let luaCode = ` + a = "debug me" + debug.debug() +`, L; + +L = lauxlib.luaL_newstate(); + +linit.luaL_openlibs(L); + +lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + +lapi.lua_call(L, 0, -1); -- cgit v1.2.3-70-g09d2