summaryrefslogtreecommitdiff
path: root/tests/test-suite/constructs.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-11 23:33:34 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-11 23:35:56 +1100
commita39f24f204a15cb4587e75b38424952fe444d9d2 (patch)
tree5047cd8b5b73bda87142405273c0dcc3203e71f4 /tests/test-suite/constructs.js
parentb0b0b21f4394fabf41d6e3556f455a0a740f3f08 (diff)
downloadfengari-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/test-suite/constructs.js')
-rw-r--r--tests/test-suite/constructs.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test-suite/constructs.js b/tests/test-suite/constructs.js
index 89bcce7..93bbf1a 100644
--- a/tests/test-suite/constructs.js
+++ b/tests/test-suite/constructs.js
@@ -5,7 +5,7 @@ const test = require('tape');
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");
const checkload = `
local function checkload (s, msg)
@@ -28,7 +28,7 @@ test('[test-suite] constructs: testing semicolons', function (t) {
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(checkload + luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(checkload + luaCode));
}, "Lua program loaded without error");
@@ -54,7 +54,7 @@ test('[test-suite] constructs: invalid operations should not raise errors when n
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(checkload + luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(checkload + luaCode));
}, "Lua program loaded without error");
@@ -119,7 +119,7 @@ test('[test-suite] constructs: testing priorities', function (t) {
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(checkload + luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(checkload + luaCode));
}, "Lua program loaded without error");
@@ -305,7 +305,7 @@ test('[test-suite] constructs: silly loops', function (t) {
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(checkload + luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(checkload + luaCode));
}, "Lua program loaded without error");
@@ -392,7 +392,7 @@ test.skip('[test-suite] constructs: huge loops, upvalue', function (t) {
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(checkload + luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(checkload + luaCode));
}, "Lua program loaded without error");
@@ -428,7 +428,7 @@ test("[test-suite] constructs: testing some syntax errors (chosen through 'gcov'
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(checkload + luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(checkload + luaCode));
}, "Lua program loaded without error");