summaryrefslogtreecommitdiff
path: root/tests/load.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/load.js')
-rw-r--r--tests/load.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/load.js b/tests/load.js
index 5f44bfa..a385959 100644
--- a/tests/load.js
+++ b/tests/load.js
@@ -5,8 +5,9 @@ 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');
test('luaL_loadstring', function (t) {
@@ -21,7 +22,7 @@ test('luaL_loadstring', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -54,7 +55,7 @@ test('load', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -89,7 +90,7 @@ test('luaL_loadbuffer', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadbuffer(L, bc, null, lua.to_luastring("test"));
@@ -122,7 +123,7 @@ test('loadfile', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -155,7 +156,7 @@ test('loadfile (binary)', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -187,7 +188,7 @@ test('dofile', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));