diff options
Diffstat (limited to 'tests/ltablib.js')
-rw-r--r-- | tests/ltablib.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/ltablib.js b/tests/ltablib.js index 15f9e57..8789f9e 100644 --- a/tests/ltablib.js +++ b/tests/ltablib.js @@ -5,8 +5,10 @@ const test = require('tape'); const tests = require("./tests.js"); const toByteCode = tests.toByteCode; -const lauxlib = require("../src/lauxlib.js"); -const lua = require('../src/lua.js'); +const lua = require('../src/lua.js'); +const lauxlib = require('../src/lauxlib.js'); +const lualib = require('../src/lualib.js'); + const inttable2array = function(t) { let a = []; @@ -32,7 +34,7 @@ test('table.concat', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-table.concat"), lua.to_luastring("binary")); @@ -61,7 +63,7 @@ test('table.pack', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-table.pack"), lua.to_luastring("binary")); @@ -92,7 +94,7 @@ test('table.unpack', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-table.unpack"), lua.to_luastring("binary")); @@ -136,7 +138,7 @@ test('table.insert', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-table.insert"), lua.to_luastring("binary")); @@ -170,7 +172,7 @@ test('table.remove', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-table.remove"), lua.to_luastring("binary")); @@ -203,7 +205,7 @@ test('table.move', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-table.move"), lua.to_luastring("binary")); @@ -236,7 +238,7 @@ test('table.sort (<)', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-table.sort"), lua.to_luastring("binary")); @@ -269,7 +271,7 @@ test('table.sort with cmp function', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-table.sort"), lua.to_luastring("binary")); |