Skip to content

Commit 78c55d0

Browse files
authored
ci: Travis: test with Lua 5.3 also (neovim#41)
* ci: Travis: test with Lua 5.3 also * test/stdio_fixture.lua: pass package.{path,cpath} via args Ref: neovim/neovim@4df38ec9d
1 parent f04c0ad commit 78c55d0

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ env:
2121
# (which is run before after_success).
2222
- SUCCESS_MARKER="$TRAVIS_BUILD_DIR/.tests_successful"
2323

24+
matrix:
25+
include:
26+
- env: LUA_URL=https://www.lua.org/ftp/lua-5.1.5.tar.gz
27+
- env: LUA_URL=https://www.lua.org/ftp/lua-5.3.5.tar.gz
28+
2429
script: .ci/script.sh
2530
before_cache: .ci/before_cache.sh
2631

test/session_spec.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ describe('stdio', function()
249249
it('sends and receive data through stdout/stdin', function()
250250
local proc_stream = ChildProcessStream.spawn({
251251
arg[i_min],
252-
'test/stdio_fixture.lua'
252+
'test/stdio_fixture.lua', package.path, package.cpath
253253
})
254254
local session = Session.new(proc_stream)
255255
session:notify('a', 0, 1)

test/stdio_fixture.lua

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
local deps_prefix = './.deps/usr'
2-
if os.getenv('DEPS_PREFIX') then
3-
deps_prefix = os.getenv('DEPS_PREFIX')
4-
end
5-
package.path =
6-
deps_prefix
7-
.. '/share/lua/5.1/?.lua;' .. deps_prefix .. '/share/lua/5.1/?/init.lua;'
8-
.. package.path
9-
package.cpath =
10-
deps_prefix
11-
.. '/lib/lua/5.1/?.so;'
12-
.. package.cpath
1+
--- stdio test fixture / program.
2+
--
3+
-- Lua's paths are passed as arguments to reflect the path in the test itself.
4+
package.path = arg[1]
5+
package.cpath = arg[2]
136
local assert = require("luassert")
147

158
local StdioStream = require('nvim.stdio_stream')

0 commit comments

Comments
 (0)