diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-11 23:33:34 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-11 23:35:56 +1100 |
commit | a39f24f204a15cb4587e75b38424952fe444d9d2 (patch) | |
tree | 5047cd8b5b73bda87142405273c0dcc3203e71f4 /tests/load.js | |
parent | b0b0b21f4394fabf41d6e3556f455a0a740f3f08 (diff) | |
download | fengari-a39f24f204a15cb4587e75b38424952fe444d9d2.tar.gz fengari-a39f24f204a15cb4587e75b38424952fe444d9d2.tar.bz2 fengari-a39f24f204a15cb4587e75b38424952fe444d9d2.zip |
Move fengari specific things to src/fengaricore.js
String manipulation functions now get exposed on 'fengari' object itself at top level
Diffstat (limited to 'tests/load.js')
-rw-r--r-- | tests/load.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/load.js b/tests/load.js index 49756a5..8555014 100644 --- a/tests/load.js +++ b/tests/load.js @@ -8,7 +8,7 @@ const toByteCode = tests.toByteCode; const lua = require('../src/lua.js'); const lauxlib = require('../src/lauxlib.js'); const lualib = require('../src/lualib.js'); - +const {to_luastring} = require("../src/fengaricore.js"); test('luaL_loadstring', function (t) { let luaCode = ` @@ -24,7 +24,7 @@ test('luaL_loadstring', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); }, "Lua program loaded without error"); @@ -56,7 +56,7 @@ test('load', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); }, "Lua program loaded without error"); @@ -90,7 +90,7 @@ test('luaL_loadbuffer', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadbuffer(L, bc, null, lua.to_luastring("test")); + lauxlib.luaL_loadbuffer(L, bc, null, to_luastring("test")); }, "Lua program loaded without error"); @@ -122,7 +122,7 @@ test('loadfile', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); }, "Lua program loaded without error"); @@ -154,7 +154,7 @@ test('loadfile (binary)', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); }, "Lua program loaded without error"); @@ -185,7 +185,7 @@ test('dofile', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); }, "Lua program loaded without error"); |