summaryrefslogtreecommitdiff
path: root/tests/lexparse.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-30 11:58:09 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-03-30 14:39:19 +0200
commit3813f2d43054708bab7221a5ca74a0183a2ebcaf (patch)
tree2e27bc81114099cbf94b18e2c139843e66db6b53 /tests/lexparse.js
parent456ab7b69f88859683c60cc2261e70d6dbadd8e8 (diff)
downloadfengari-3813f2d43054708bab7221a5ca74a0183a2ebcaf.tar.gz
fengari-3813f2d43054708bab7221a5ca74a0183a2ebcaf.tar.bz2
fengari-3813f2d43054708bab7221a5ca74a0183a2ebcaf.zip
8-bit only in lstrlib
Diffstat (limited to 'tests/lexparse.js')
-rw-r--r--tests/lexparse.js54
1 files changed, 27 insertions, 27 deletions
diff --git a/tests/lexparse.js b/tests/lexparse.js
index edffe53..92901b1 100644
--- a/tests/lexparse.js
+++ b/tests/lexparse.js
@@ -31,7 +31,7 @@ test('LOADK, RETURN', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -71,7 +71,7 @@ test('MOVE', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -111,7 +111,7 @@ test('Binary op', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -151,7 +151,7 @@ test('Unary op, LOADBOOL', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -189,7 +189,7 @@ test('NEWTABLE', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -231,7 +231,7 @@ test('CALL', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -277,7 +277,7 @@ test('Multiple return', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -318,7 +318,7 @@ test('TAILCALL', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -359,7 +359,7 @@ test('VARARG', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -398,7 +398,7 @@ test('LE, JMP', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -437,7 +437,7 @@ test('LT', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -476,7 +476,7 @@ test('EQ', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -516,7 +516,7 @@ test('TESTSET (and)', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -556,7 +556,7 @@ test('TESTSET (or)', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -600,7 +600,7 @@ test('TEST (false)', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -643,7 +643,7 @@ test('FORPREP, FORLOOP (int)', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -686,7 +686,7 @@ test('FORPREP, FORLOOP (float)', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -728,7 +728,7 @@ test('SETTABLE, GETTABLE', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -779,7 +779,7 @@ test('SETUPVAL, GETUPVAL', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -821,7 +821,7 @@ test('SETTABUP, GETTABUP', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -871,7 +871,7 @@ test('SELF', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -910,7 +910,7 @@ test('SETLIST', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -953,7 +953,7 @@ test('Variable SETLIST', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -991,7 +991,7 @@ test('Long SETLIST', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -1046,7 +1046,7 @@ test('TFORCALL, TFORLOOP', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -1087,7 +1087,7 @@ test('LEN', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));
@@ -1136,7 +1136,7 @@ test('CONCAT', function (t) {
let reader = function(L, data) {
let code = luaCode ? luaCode.trim() : null;
luaCode = null;
- return code;
+ return code ? lua.to_luastring(code) : null;
};
lapi.lua_load(L, reader, luaCode, lua.to_luastring("test"), lua.to_luastring("text"));