Fix. Supports Lua 5.3.beta
parent
47f68fa1a0
commit
15f4b2d53a
|
@ -6,6 +6,7 @@ env:
|
|||
matrix:
|
||||
- LUA=lua5.1
|
||||
- LUA=lua5.2
|
||||
- LUA=lua5.3
|
||||
- LUA=luajit
|
||||
|
||||
branches:
|
||||
|
@ -15,11 +16,11 @@ branches:
|
|||
before_install:
|
||||
- sudo apt-get update
|
||||
- bash .travis/setup_lua.sh
|
||||
- sudo luarocks install lunitx
|
||||
- sudo luarocks install https://raw.github.com/moteus/lunit/moteus-skip/rockspecs/lunitx-scm.mot.skip-0.rockspec
|
||||
- sudo pip install cpp-coveralls
|
||||
- sudo luarocks install dkjson
|
||||
- sudo luarocks install luafilesystem
|
||||
- sudo luarocks install lua-path
|
||||
- sudo luarocks install dkjson --deps-mode=none
|
||||
- sudo luarocks install luafilesystem --from=https://rocks.moonscript.org/dev
|
||||
- sudo luarocks install lua-path --deps-mode=none
|
||||
- sudo luarocks install luacov-coveralls
|
||||
|
||||
install:
|
||||
|
|
|
@ -56,6 +56,9 @@ else
|
|||
elif [ "$LUA" == "lua5.2" ]; then
|
||||
curl http://www.lua.org/ftp/lua-5.2.3.tar.gz | tar xz
|
||||
cd lua-5.2.3;
|
||||
elif [ "$LUA" == "lua5.3" ]; then
|
||||
curl http://www.lua.org/work/lua-5.3.0-beta.tar.gz | tar xz
|
||||
cd lua-5.3.0-beta;
|
||||
fi
|
||||
sudo make $PLATFORM install;
|
||||
fi
|
||||
|
@ -93,4 +96,6 @@ elif [ "$LUA" == "lua5.1" ]; then
|
|||
rm -rf lua-5.1.5;
|
||||
elif [ "$LUA" == "lua5.2" ]; then
|
||||
rm -rf lua-5.2.3;
|
||||
elif [ "$LUA" == "lua5.3" ]; then
|
||||
rm -rf lua-5.3.0-beta;
|
||||
fi
|
||||
|
|
|
@ -14,6 +14,23 @@
|
|||
#include "lua.h"
|
||||
#include "lauxlib.h"
|
||||
|
||||
#if LUA_VERSION_NUM >= 503 /* Lua 5.3 */
|
||||
|
||||
#ifndef luaL_optint
|
||||
# define luaL_optint luaL_optinteger
|
||||
#endif
|
||||
|
||||
#ifndef luaL_checkint
|
||||
# define luaL_checkint luaL_checkinteger
|
||||
#endif
|
||||
|
||||
#ifndef luaL_checklong
|
||||
# define luaL_checklong luaL_checkinteger
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if LUA_VERSION_NUM >= 502 // lua 5.2
|
||||
|
||||
// lua_rawgetp
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
local RUN = lunit and function()end or function ()
|
||||
local lunit, RUN = lunit do
|
||||
RUN = lunit and function()end or function ()
|
||||
local res = lunit.run()
|
||||
if res.errors + res.failed > 0 then
|
||||
os.exit(-1)
|
||||
end
|
||||
return os.exit(0)
|
||||
end
|
||||
lunit = require "lunit"
|
||||
end
|
||||
|
||||
local _,luacov = pcall(require, "luacov")
|
||||
local lunit = require "lunit"
|
||||
local TEST_CASE = assert(lunit.TEST_CASE)
|
||||
local skip = lunit.skip or function() end
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
local RUN = lunit and function()end or function ()
|
||||
local lunit, RUN = lunit do
|
||||
RUN = lunit and function()end or function ()
|
||||
local res = lunit.run()
|
||||
if res.errors + res.failed > 0 then
|
||||
os.exit(-1)
|
||||
end
|
||||
return os.exit(0)
|
||||
end
|
||||
lunit = require "lunit"
|
||||
end
|
||||
|
||||
local lunit = require "lunit"
|
||||
local TEST_CASE = assert(lunit.TEST_CASE)
|
||||
local skip = lunit.skip or function() end
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
local RUN = lunit and function()end or function ()
|
||||
local lunit, RUN = lunit do
|
||||
RUN = lunit and function()end or function ()
|
||||
local res = lunit.run()
|
||||
if res.errors + res.failed > 0 then
|
||||
os.exit(-1)
|
||||
end
|
||||
return os.exit(0)
|
||||
end
|
||||
lunit = require "lunit"
|
||||
end
|
||||
|
||||
local lunit = require "lunit"
|
||||
local TEST_CASE = assert(lunit.TEST_CASE)
|
||||
local skip = lunit.skip or function() end
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
local RUN = lunit and function()end or function ()
|
||||
local lunit, RUN = lunit do
|
||||
RUN = lunit and function()end or function ()
|
||||
local res = lunit.run()
|
||||
if res.errors + res.failed > 0 then
|
||||
os.exit(-1)
|
||||
end
|
||||
return os.exit(0)
|
||||
end
|
||||
lunit = require "lunit"
|
||||
end
|
||||
|
||||
local lunit = require "lunit"
|
||||
local TEST_CASE = assert(lunit.TEST_CASE)
|
||||
local skip = lunit.skip or function() end
|
||||
|
||||
|
|
Loading…
Reference in New Issue