From 6fdfa3b88c043b124eca4f91c4d1e7e3cc7046b2 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 26 Apr 2017 21:47:54 +1000 Subject: Export luaL_openlibs from lauxlib.js --- tests/ltm.js | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'tests/ltm.js') diff --git a/tests/ltm.js b/tests/ltm.js index ab68e5e..358e396 100644 --- a/tests/ltm.js +++ b/tests/ltm.js @@ -5,7 +5,6 @@ const beautify = require('js-beautify').js_beautify; const lua = require("../src/lua.js"); const VM = require("../src/lvm.js"); -const linit = require("../src/linit.js"); const lauxlib = require("../src/lauxlib.js"); const OC = require('../src/lopcodes.js'); @@ -27,7 +26,7 @@ test('__index, __newindex: with actual table', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); lua.lua_call(L, 0, -1); @@ -59,7 +58,7 @@ test('__newindex: with non table', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -92,7 +91,7 @@ test('__index function in metatable', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -134,7 +133,7 @@ test('__newindex function in metatable', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -174,7 +173,7 @@ test('__index table in metatable', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -217,7 +216,7 @@ test('__newindex table in metatable', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -271,7 +270,7 @@ test('__index table with own metatable', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -324,7 +323,7 @@ test('__newindex table with own metatable', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -425,7 +424,7 @@ test('binary __xxx functions in metatable', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -477,7 +476,7 @@ test('__eq', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -515,7 +514,7 @@ test('__lt', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -553,7 +552,7 @@ test('__le', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -591,7 +590,7 @@ test('__le that uses __lt', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -633,7 +632,7 @@ test('__unm, __bnot', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -678,7 +677,7 @@ test('__len', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -717,7 +716,7 @@ test('__concat', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); @@ -756,7 +755,7 @@ test('__call', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary")); }, "Bytecode parsed without errors"); -- cgit v1.2.3-54-g00ecf