summaryrefslogtreecommitdiff
path: root/tests/ltablib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-04-26 21:47:54 +1000
committerBenoit Giannangeli <giann008@gmail.com>2017-04-26 14:00:02 +0200
commit6fdfa3b88c043b124eca4f91c4d1e7e3cc7046b2 (patch)
treed60c55ad8a4621f1a339e6f240675bd32059b347 /tests/ltablib.js
parentf93607f954c002b251fba4e0b85493e0b2b619b4 (diff)
downloadfengari-6fdfa3b88c043b124eca4f91c4d1e7e3cc7046b2.tar.gz
fengari-6fdfa3b88c043b124eca4f91c4d1e7e3cc7046b2.tar.bz2
fengari-6fdfa3b88c043b124eca4f91c4d1e7e3cc7046b2.zip
Export luaL_openlibs from lauxlib.js
Diffstat (limited to 'tests/ltablib.js')
-rw-r--r--tests/ltablib.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/ltablib.js b/tests/ltablib.js
index 535876a..870d24c 100644
--- a/tests/ltablib.js
+++ b/tests/ltablib.js
@@ -10,7 +10,6 @@ const toByteCode = tests.toByteCode;
const VM = require("../src/lvm.js");
const lauxlib = require("../src/lauxlib.js");
const lua = require('../src/lua.js');
-const linit = require('../src/linit.js');
const lstate = require('../src/lstate.js');
const inttable2array = function(t) {
@@ -37,7 +36,7 @@ test('table.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-table.concat"), lua.to_luastring("binary"));
@@ -66,7 +65,7 @@ test('table.pack', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test-table.pack"), lua.to_luastring("binary"));
@@ -97,7 +96,7 @@ test('table.unpack', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test-table.unpack"), lua.to_luastring("binary"));
@@ -141,7 +140,7 @@ test('table.insert', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test-table.insert"), lua.to_luastring("binary"));
@@ -175,7 +174,7 @@ test('table.remove', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test-table.remove"), lua.to_luastring("binary"));
@@ -208,7 +207,7 @@ test('table.move', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test-table.move"), lua.to_luastring("binary"));
@@ -241,7 +240,7 @@ test('table.sort (<)', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test-table.sort"), lua.to_luastring("binary"));
@@ -274,7 +273,7 @@ test('table.sort with cmp function', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test-table.sort"), lua.to_luastring("binary"));