summaryrefslogtreecommitdiff
path: root/tests/loadlib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-11 14:02:23 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-11 15:19:18 +1000
commite7cf17565e26dc5c4a100688526b0dfed1220e44 (patch)
treeee4606b23f9c62ecf0e6da20dcbf0472d5339fd9 /tests/loadlib.js
parentbe3f9810115cbaded69be37ebc3d088ee252a225 (diff)
downloadfengari-e7cf17565e26dc5c4a100688526b0dfed1220e44.tar.gz
fengari-e7cf17565e26dc5c4a100688526b0dfed1220e44.tar.bz2
fengari-e7cf17565e26dc5c4a100688526b0dfed1220e44.zip
Move luaL_openlibs from lauxlib to lualib
Diffstat (limited to 'tests/loadlib.js')
-rw-r--r--tests/loadlib.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/loadlib.js b/tests/loadlib.js
index ee87b4a..5854519 100644
--- a/tests/loadlib.js
+++ b/tests/loadlib.js
@@ -2,8 +2,10 @@
const test = require('tape');
-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('require an existing module', function (t) {
let luaCode = `
@@ -16,7 +18,7 @@ test('require an existing module', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -47,7 +49,7 @@ test('require a file', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -79,7 +81,7 @@ test('package.loadlib', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -111,7 +113,7 @@ test('package.searchpath', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));