aboutsummaryrefslogtreecommitdiff
path: root/test/manual-tests/debug-cli.js
blob: dc49a0e0b0fdf98eabda951fcbc39e9efbfab7d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env node
"use strict";

const lua     = require('../../src/lua.js');
const lauxlib = require('../../src/lauxlib.js');
const lualib  = require('../../src/lualib.js');
const {to_luastring} = require("../../src/fengaricore.js");

let luaCode = `
    a = "debug me"
    debug.debug()
`, L;

L = lauxlib.luaL_newstate();

lualib.luaL_openlibs(L);

lauxlib.luaL_loadstring(L, to_luastring(luaCode));

lua.lua_call(L, 0, 0);