Fix. Supports Lua 5.3.beta
This commit is contained in:
parent
47f68fa1a0
commit
15f4b2d53a
@ -6,6 +6,7 @@ env:
|
|||||||
matrix:
|
matrix:
|
||||||
- LUA=lua5.1
|
- LUA=lua5.1
|
||||||
- LUA=lua5.2
|
- LUA=lua5.2
|
||||||
|
- LUA=lua5.3
|
||||||
- LUA=luajit
|
- LUA=luajit
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
@ -15,11 +16,11 @@ branches:
|
|||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- bash .travis/setup_lua.sh
|
- 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 pip install cpp-coveralls
|
||||||
- sudo luarocks install dkjson
|
- sudo luarocks install dkjson --deps-mode=none
|
||||||
- sudo luarocks install luafilesystem
|
- sudo luarocks install luafilesystem --from=https://rocks.moonscript.org/dev
|
||||||
- sudo luarocks install lua-path
|
- sudo luarocks install lua-path --deps-mode=none
|
||||||
- sudo luarocks install luacov-coveralls
|
- sudo luarocks install luacov-coveralls
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
@ -56,6 +56,9 @@ else
|
|||||||
elif [ "$LUA" == "lua5.2" ]; then
|
elif [ "$LUA" == "lua5.2" ]; then
|
||||||
curl http://www.lua.org/ftp/lua-5.2.3.tar.gz | tar xz
|
curl http://www.lua.org/ftp/lua-5.2.3.tar.gz | tar xz
|
||||||
cd lua-5.2.3;
|
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
|
fi
|
||||||
sudo make $PLATFORM install;
|
sudo make $PLATFORM install;
|
||||||
fi
|
fi
|
||||||
@ -93,4 +96,6 @@ elif [ "$LUA" == "lua5.1" ]; then
|
|||||||
rm -rf lua-5.1.5;
|
rm -rf lua-5.1.5;
|
||||||
elif [ "$LUA" == "lua5.2" ]; then
|
elif [ "$LUA" == "lua5.2" ]; then
|
||||||
rm -rf lua-5.2.3;
|
rm -rf lua-5.2.3;
|
||||||
|
elif [ "$LUA" == "lua5.3" ]; then
|
||||||
|
rm -rf lua-5.3.0-beta;
|
||||||
fi
|
fi
|
||||||
|
@ -14,6 +14,23 @@
|
|||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
#include "lauxlib.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
|
#if LUA_VERSION_NUM >= 502 // lua 5.2
|
||||||
|
|
||||||
// lua_rawgetp
|
// 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()
|
local res = lunit.run()
|
||||||
if res.errors + res.failed > 0 then
|
if res.errors + res.failed > 0 then
|
||||||
os.exit(-1)
|
os.exit(-1)
|
||||||
end
|
end
|
||||||
return os.exit(0)
|
return os.exit(0)
|
||||||
end
|
end
|
||||||
|
lunit = require "lunit"
|
||||||
|
end
|
||||||
|
|
||||||
local _,luacov = pcall(require, "luacov")
|
local _,luacov = pcall(require, "luacov")
|
||||||
local lunit = require "lunit"
|
|
||||||
local TEST_CASE = assert(lunit.TEST_CASE)
|
local TEST_CASE = assert(lunit.TEST_CASE)
|
||||||
local skip = lunit.skip or function() end
|
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()
|
local res = lunit.run()
|
||||||
if res.errors + res.failed > 0 then
|
if res.errors + res.failed > 0 then
|
||||||
os.exit(-1)
|
os.exit(-1)
|
||||||
end
|
end
|
||||||
return os.exit(0)
|
return os.exit(0)
|
||||||
end
|
end
|
||||||
|
lunit = require "lunit"
|
||||||
|
end
|
||||||
|
|
||||||
local lunit = require "lunit"
|
|
||||||
local TEST_CASE = assert(lunit.TEST_CASE)
|
local TEST_CASE = assert(lunit.TEST_CASE)
|
||||||
local skip = lunit.skip or function() end
|
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()
|
local res = lunit.run()
|
||||||
if res.errors + res.failed > 0 then
|
if res.errors + res.failed > 0 then
|
||||||
os.exit(-1)
|
os.exit(-1)
|
||||||
end
|
end
|
||||||
return os.exit(0)
|
return os.exit(0)
|
||||||
end
|
end
|
||||||
|
lunit = require "lunit"
|
||||||
|
end
|
||||||
|
|
||||||
local lunit = require "lunit"
|
|
||||||
local TEST_CASE = assert(lunit.TEST_CASE)
|
local TEST_CASE = assert(lunit.TEST_CASE)
|
||||||
local skip = lunit.skip or function() end
|
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()
|
local res = lunit.run()
|
||||||
if res.errors + res.failed > 0 then
|
if res.errors + res.failed > 0 then
|
||||||
os.exit(-1)
|
os.exit(-1)
|
||||||
end
|
end
|
||||||
return os.exit(0)
|
return os.exit(0)
|
||||||
end
|
end
|
||||||
|
lunit = require "lunit"
|
||||||
|
end
|
||||||
|
|
||||||
local lunit = require "lunit"
|
|
||||||
local TEST_CASE = assert(lunit.TEST_CASE)
|
local TEST_CASE = assert(lunit.TEST_CASE)
|
||||||
local skip = lunit.skip or function() end
|
local skip = lunit.skip or function() end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user