From 9d6afeba223c22163928557c69a102877223d3bd Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Wed, 15 Feb 2017 22:13:01 +0100 Subject: Everything need to make luaL_newstate work, lua_pushnil test --- tests/lapi.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/lapi.js') diff --git a/tests/lapi.js b/tests/lapi.js index 2f493c9..b79c519 100644 --- a/tests/lapi.js +++ b/tests/lapi.js @@ -9,20 +9,19 @@ const getState = require("./tests.js").getState; const VM = require("../src/lvm.js"); const ldo = require("../src/ldo.js"); const lapi = require("../src/lapi.js"); +const lauxlib = require("../src/lauxlib.js"); const CT = require('../src/lua.js').constant_types; -test('lua_pushnil', function (t) { +test('luaL_newstate, lua_pushnil', function (t) { let L; - t.plan(3); + t.plan(2); t.doesNotThrow(function () { - L = getState(`return "dummy"`); - }, "New Lua State initiliazed"); + L = lauxlib.luaL_newstate() - // t.doesNotThrow(function () { lapi.lua_pushnil(L); - // }, "Pushed nil on the stack"); + }, "JS Lua program ran without error"); t.strictEqual( L.stack[L.top - 1].type, -- cgit v1.2.3-54-g00ecf