server_requests_spec: fix assertion, pass Lua paths via args (#10875)

This makes it pick up the nvim Luarocks module properly when not
installed via third-party.
This commit is contained in:
Daniel Hahler
2019-09-16 19:16:39 +02:00
committed by GitHub
parent 8f3d0276ee
commit 4df38ec9df
2 changed files with 17 additions and 13 deletions

View File

@@ -1,12 +1,8 @@
local deps_prefix = (os.getenv('DEPS_PREFIX') and os.getenv('DEPS_PREFIX')
or './.deps/usr')
package.path = deps_prefix .. '/share/lua/5.1/?.lua;' ..
deps_prefix .. '/share/lua/5.1/?/init.lua;' ..
package.path
package.cpath = deps_prefix .. '/lib/lua/5.1/?.so;' ..
package.cpath
--- RPC server fixture.
--
-- Lua's paths are passed as arguments to reflect the path in the test itself.
package.path = arg[1]
package.cpath = arg[2]
local mpack = require('mpack')
local StdioStream = require('nvim.stdio_stream')