diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-29 14:39:57 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-30 09:57:53 +0200 |
commit | 456ab7b69f88859683c60cc2261e70d6dbadd8e8 (patch) | |
tree | 12baf4ae489e7afd4819ec94bc413c1c2a1db05d /tests/ltablib.js | |
parent | 2e5b595a2e04fe72555a565af4aae43560946473 (diff) | |
download | fengari-456ab7b69f88859683c60cc2261e70d6dbadd8e8.tar.gz fengari-456ab7b69f88859683c60cc2261e70d6dbadd8e8.tar.bz2 fengari-456ab7b69f88859683c60cc2261e70d6dbadd8e8.zip |
8-bit string internally tests
Lexing/Parsing is done on byte rather than js strings
Diffstat (limited to 'tests/ltablib.js')
-rw-r--r-- | tests/ltablib.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/ltablib.js b/tests/ltablib.js index c8a1e73..81ffcbd 100644 --- a/tests/ltablib.js +++ b/tests/ltablib.js @@ -42,14 +42,14 @@ test('table.concat', function (t) { linit.luaL_openlibs(L); - lapi.lua_load(L, null, bc, "test-table.concat", "binary"); + lapi.lua_load(L, null, bc, lua.to_luastring("test-table.concat"), lua.to_luastring("binary")); lapi.lua_call(L, 0, -1); }, "JS Lua program ran without error"); t.strictEqual( - lapi.lua_tostring(L, -1), + lapi.lua_tojsstring(L, -1), "3,4,5", "Correct element(s) on the stack" ); @@ -71,7 +71,7 @@ test('table.pack', function (t) { linit.luaL_openlibs(L); - lapi.lua_load(L, null, bc, "test-table.pack", "binary"); + lapi.lua_load(L, null, bc, lua.to_luastring("test-table.pack"), lua.to_luastring("binary")); lapi.lua_call(L, 0, -1); @@ -102,7 +102,7 @@ test('table.unpack', function (t) { linit.luaL_openlibs(L); - lapi.lua_load(L, null, bc, "test-table.unpack", "binary"); + lapi.lua_load(L, null, bc, lua.to_luastring("test-table.unpack"), lua.to_luastring("binary")); lapi.lua_call(L, 0, -1); @@ -146,7 +146,7 @@ test('table.insert', function (t) { linit.luaL_openlibs(L); - lapi.lua_load(L, null, bc, "test-table.insert", "binary"); + lapi.lua_load(L, null, bc, lua.to_luastring("test-table.insert"), lua.to_luastring("binary")); lapi.lua_call(L, 0, -1); @@ -180,7 +180,7 @@ test('table.remove', function (t) { linit.luaL_openlibs(L); - lapi.lua_load(L, null, bc, "test-table.remove", "binary"); + lapi.lua_load(L, null, bc, lua.to_luastring("test-table.remove"), lua.to_luastring("binary")); lapi.lua_call(L, 0, -1); @@ -213,7 +213,7 @@ test('table.move', function (t) { linit.luaL_openlibs(L); - lapi.lua_load(L, null, bc, "test-table.move", "binary"); + lapi.lua_load(L, null, bc, lua.to_luastring("test-table.move"), lua.to_luastring("binary")); lapi.lua_call(L, 0, -1); @@ -246,7 +246,7 @@ test('table.sort (<)', function (t) { linit.luaL_openlibs(L); - lapi.lua_load(L, null, bc, "test-table.sort", "binary"); + lapi.lua_load(L, null, bc, lua.to_luastring("test-table.sort"), lua.to_luastring("binary")); lapi.lua_call(L, 0, -1); @@ -279,7 +279,7 @@ test('table.sort with cmp function', function (t) { linit.luaL_openlibs(L); - lapi.lua_load(L, null, bc, "test-table.sort", "binary"); + lapi.lua_load(L, null, bc, lua.to_luastring("test-table.sort"), lua.to_luastring("binary")); lapi.lua_call(L, 0, -1); @@ -290,4 +290,4 @@ test('table.sort with cmp function', function (t) { [5, 4, 3, 2, 1], "Correct element(s) on the stack" ); -});
\ No newline at end of file +}); |