summaryrefslogtreecommitdiff
path: root/tests/lua.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-10 02:22:47 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-10 02:36:36 +1100
commita946df6302452323706f715a28029c63f766d1db (patch)
tree971f4f82ecb648dc08a96e1a1a25bc7ef1598a0c /tests/lua.js
parentfa8ba4f04623f66962c9fa2a502dd8d51a3eefa6 (diff)
downloadfengari-a946df6302452323706f715a28029c63f766d1db.tar.gz
fengari-a946df6302452323706f715a28029c63f766d1db.tar.bz2
fengari-a946df6302452323706f715a28029c63f766d1db.zip
tests/: Fix linter complaints
Diffstat (limited to 'tests/lua.js')
-rw-r--r--tests/lua.js97
1 files changed, 46 insertions, 51 deletions
diff --git a/tests/lua.js b/tests/lua.js
index 487f748..82df6ff 100644
--- a/tests/lua.js
+++ b/tests/lua.js
@@ -9,85 +9,80 @@ const lapi = require('../src/lapi.js');
// TODO: remove
-if (false) {
- test('locals.lua', function (t) {
- let luaCode = `
- _soft = true
- require = function(lib) return _G[lib] end -- NYI
- return dofile("tests/lua-tests/locals.lua")
- `, L;
-
- t.plan(2);
+test.skip('locals.lua', function (t) {
+ let luaCode = `
+ _soft = true
+ require = function(lib) return _G[lib] end -- NYI
+ return dofile("tests/lua-tests/locals.lua")
+ `, L;
- t.doesNotThrow(function () {
+ t.plan(2);
- L = lauxlib.luaL_newstate();
+ t.doesNotThrow(function () {
- lualib.luaL_openlibs(L);
+ L = lauxlib.luaL_newstate();
- lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
+ lualib.luaL_openlibs(L);
- }, "Lua program loaded without error");
+ lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
- t.doesNotThrow(function () {
+ }, "Lua program loaded without error");
- lapi.lua_call(L, 0, -1);
+ t.doesNotThrow(function () {
- }, "Lua program ran without error");
+ lapi.lua_call(L, 0, -1);
- });
+ }, "Lua program ran without error");
+});
- test('constructs.lua', function (t) {
- let luaCode = `
- _soft = true
- require = function(lib) return _G[lib] end -- NYI
- return dofile("tests/lua-tests/constructs.lua")
- `, L;
-
- t.plan(2);
+test.skip('constructs.lua', function (t) {
+ let luaCode = `
+ _soft = true
+ require = function(lib) return _G[lib] end -- NYI
+ return dofile("tests/lua-tests/constructs.lua")
+ `, L;
- t.doesNotThrow(function () {
+ t.plan(2);
- L = lauxlib.luaL_newstate();
+ t.doesNotThrow(function () {
- lualib.luaL_openlibs(L);
+ L = lauxlib.luaL_newstate();
- lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
+ lualib.luaL_openlibs(L);
- }, "Lua program loaded without error");
+ lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
- t.doesNotThrow(function () {
+ }, "Lua program loaded without error");
- lapi.lua_call(L, 0, -1);
+ t.doesNotThrow(function () {
- }, "Lua program ran without error");
+ lapi.lua_call(L, 0, -1);
- });
+ }, "Lua program ran without error");
+});
- test('strings.lua', function (t) {
- let luaCode = `
- return dofile("tests/lua-tests/strings.lua")
- `, L;
-
- t.plan(2);
+test.skip('strings.lua', function (t) {
+ let luaCode = `
+ return dofile("tests/lua-tests/strings.lua")
+ `, L;
- t.doesNotThrow(function () {
+ t.plan(2);
- L = lauxlib.luaL_newstate();
+ t.doesNotThrow(function () {
- lualib.luaL_openlibs(L);
+ L = lauxlib.luaL_newstate();
- lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
+ lualib.luaL_openlibs(L);
- }, "Lua program loaded without error");
+ lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
- t.doesNotThrow(function () {
+ }, "Lua program loaded without error");
- lapi.lua_call(L, 0, -1);
+ t.doesNotThrow(function () {
- }, "Lua program ran without error");
+ lapi.lua_call(L, 0, -1);
- });
-}
+ }, "Lua program ran without error");
+});