diff options
Diffstat (limited to 'tests/test-suite/calls.js')
-rw-r--r-- | tests/test-suite/calls.js | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/tests/test-suite/calls.js b/tests/test-suite/calls.js index 63d7f35..451f6c0 100644 --- a/tests/test-suite/calls.js +++ b/tests/test-suite/calls.js @@ -4,8 +4,9 @@ const test = require('tape'); global.WEB = false; -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("[test-suite] calls: test 'type'", function (t) { @@ -30,7 +31,7 @@ test("[test-suite] calls: test 'type'", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -68,7 +69,7 @@ test("[test-suite] calls: test error in 'print'", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -104,7 +105,7 @@ test("[test-suite] calls: testing local-function recursion", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -211,7 +212,7 @@ test("[test-suite] calls: testing declarations", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -269,7 +270,7 @@ test("[test-suite] calls: testing closures", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -327,7 +328,7 @@ test("[test-suite] calls: testing multiple returns", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -356,7 +357,7 @@ test("[test-suite] calls: testing calls with 'incorrect' arguments", function (t L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -428,7 +429,7 @@ test("[test-suite] calls: test for generic load", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -454,7 +455,7 @@ test("[test-suite] calls: any value is valid for _ENV", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -491,7 +492,7 @@ test("[test-suite] calls: load when _ENV is not first upvalue", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -536,7 +537,7 @@ test("[test-suite] calls: test generic load with nested functions", function (t) L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -576,7 +577,7 @@ test("[test-suite] calls: test for dump/undump with upvalues", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -623,7 +624,7 @@ test("[test-suite] calls: test for dump/undump with many upvalues", function (t) L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -655,7 +656,7 @@ test("[test-suite] calls: test for long method names", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -683,7 +684,7 @@ test("[test-suite] calls: test for bug in parameter adjustment", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -742,7 +743,7 @@ test("[test-suite] calls: testing binary chunks", function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); |