diff options
Diffstat (limited to 'tests/lstrlib.js')
-rw-r--r-- | tests/lstrlib.js | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/tests/lstrlib.js b/tests/lstrlib.js index f4c7ba4..63c8158 100644 --- a/tests/lstrlib.js +++ b/tests/lstrlib.js @@ -8,7 +8,6 @@ const toByteCode = tests.toByteCode; const lua = require("../src/lua.js"); const lauxlib = require("../src/lauxlib.js"); -const linit = require('../src/linit.js'); test('string.len', function (t) { @@ -23,7 +22,7 @@ test('string.len', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -61,7 +60,7 @@ test('string.char', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -92,7 +91,7 @@ test('string.upper, string.lower', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -129,7 +128,7 @@ test('string.rep', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -160,7 +159,7 @@ test('string.reverse', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -191,7 +190,7 @@ test('string.byte', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -234,7 +233,7 @@ test('string.format', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -265,7 +264,7 @@ test('string.format', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -296,7 +295,7 @@ test('string.format', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -337,7 +336,7 @@ test('string.sub', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -436,7 +435,7 @@ test('string.dump', function (t) { t.doesNotThrow(function () { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode.trim())); @@ -476,7 +475,7 @@ test('string.pack/unpack/packsize', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -512,7 +511,7 @@ test('string.find without pattern', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -549,7 +548,7 @@ test('string.match', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -586,7 +585,7 @@ test('string.find', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -642,7 +641,7 @@ test('string.gmatch', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -691,7 +690,7 @@ test('string.gsub', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -728,7 +727,7 @@ test('string.gsub (number)', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -765,7 +764,7 @@ test('string.gsub (pattern)', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -804,7 +803,7 @@ test('string.gsub (function)', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); @@ -843,7 +842,7 @@ test('string.gsub (table)', function (t) { L = lauxlib.luaL_newstate(); - linit.luaL_openlibs(L); + lauxlib.luaL_openlibs(L); lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); |