summaryrefslogtreecommitdiff
path: root/tests/debug-cli.js
blob: aa6847f442f1d8aaaac6e1d0d0f231bc92fcd26b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);