From a39f24f204a15cb4587e75b38424952fe444d9d2 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 11 Jan 2018 23:33:34 +1100 Subject: Move fengari specific things to src/fengaricore.js String manipulation functions now get exposed on 'fengari' object itself at top level --- tests/lcorolib.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/lcorolib.js') diff --git a/tests/lcorolib.js b/tests/lcorolib.js index e1868b2..42f9677 100644 --- a/tests/lcorolib.js +++ b/tests/lcorolib.js @@ -6,7 +6,7 @@ const lua = require('../src/lua.js'); const lauxlib = require('../src/lauxlib.js'); const lualib = require('../src/lualib.js'); const lstate = require('../src/lstate.js'); - +const {to_luastring} = require("../src/fengaricore.js"); test('coroutine.create, coroutine.yield, coroutine.resume', function (t) { let luaCode = ` @@ -29,7 +29,7 @@ test('coroutine.create, coroutine.yield, coroutine.resume', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); lua.lua_call(L, 0, -1); @@ -70,7 +70,7 @@ test('coroutine.status', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); lua.lua_call(L, 0, -1); @@ -109,7 +109,7 @@ test('coroutine.isyieldable', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); lua.lua_call(L, 0, -1); @@ -148,7 +148,7 @@ test('coroutine.running', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); lua.lua_call(L, 0, -1); @@ -187,7 +187,7 @@ test('coroutine.wrap', function (t) { lualib.luaL_openlibs(L); - lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); + lauxlib.luaL_loadstring(L, to_luastring(luaCode)); lua.lua_call(L, 0, -1); -- cgit v1.2.3-54-g00ecf