summaryrefslogtreecommitdiff
path: root/tests/loslib.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/loslib.js')
-rw-r--r--tests/loslib.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/loslib.js b/tests/loslib.js
index a80ccad..24e73c8 100644
--- a/tests/loslib.js
+++ b/tests/loslib.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('os.time', function (t) {
let luaCode = `
@@ -16,7 +18,7 @@ test('os.time', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -51,7 +53,7 @@ test('os.time (with format)', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -85,7 +87,7 @@ test('os.difftime', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -120,7 +122,7 @@ test('os.date', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
@@ -152,7 +154,7 @@ test('os.getenv', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));