aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/debug-cli.js19
1 files changed, 19 insertions, 0 deletions
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);