aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/functional/helpers.lua4
-rw-r--r--test/functional/lua/fs_spec.lua4
-rw-r--r--test/functional/shada/shada_spec.lua2
-rw-r--r--test/functional/ui/messages_spec.lua2
-rw-r--r--test/helpers.lua3
-rw-r--r--test/unit/helpers.lua10
6 files changed, 12 insertions, 13 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 5653810f28..e1fbfe6ff3 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -18,7 +18,7 @@ local fail = global_helpers.fail
local module = {}
local runtime_set = 'set runtimepath^=./build/lib/nvim/'
-module.nvim_prog = (os.getenv('NVIM_PRG') or global_helpers.test_build_dir .. '/bin/nvim')
+module.nvim_prog = (os.getenv('NVIM_PRG') or global_helpers.paths.test_build_dir .. '/bin/nvim')
-- Default settings for the test session.
module.nvim_set = (
'set shortmess+=IS background=light termguicolors noswapfile noautoindent startofline'
@@ -915,7 +915,7 @@ end
function module.add_builddir_to_rtp()
-- Add runtime from build dir for doc/tags (used with :help).
- module.command(string.format([[set rtp+=%s/runtime]], module.test_build_dir))
+ module.command(string.format([[set rtp+=%s/runtime]], module.paths.test_build_dir))
end
-- Kill (reap) a process by PID.
diff --git a/test/functional/lua/fs_spec.lua b/test/functional/lua/fs_spec.lua
index 66ba0f71f2..6821fe3c5e 100644
--- a/test/functional/lua/fs_spec.lua
+++ b/test/functional/lua/fs_spec.lua
@@ -6,8 +6,8 @@ local eq = helpers.eq
local mkdir_p = helpers.mkdir_p
local rmdir = helpers.rmdir
local nvim_dir = helpers.nvim_dir
-local test_build_dir = helpers.test_build_dir
-local test_source_path = helpers.test_source_path
+local test_build_dir = helpers.paths.test_build_dir
+local test_source_path = helpers.paths.test_source_path
local nvim_prog = helpers.nvim_prog
local is_os = helpers.is_os
local mkdir = helpers.mkdir
diff --git a/test/functional/shada/shada_spec.lua b/test/functional/shada/shada_spec.lua
index 2942beab2f..6eb318015d 100644
--- a/test/functional/shada/shada_spec.lua
+++ b/test/functional/shada/shada_spec.lua
@@ -7,7 +7,7 @@ local is_os = helpers.is_os
local skip = helpers.skip
local uv = vim.uv
-local paths = require('test.cmakeconfig.paths')
+local paths = helpers.paths
local shada_helpers = require('test.functional.shada.helpers')
local reset, clear, get_shada_rw =
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index a742f765a9..9d1b6163d2 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -7,7 +7,7 @@ local command = helpers.command
local set_method_error = helpers.set_method_error
local api = helpers.api
local async_meths = helpers.async_meths
-local test_build_dir = helpers.test_build_dir
+local test_build_dir = helpers.paths.test_build_dir
local nvim_prog = helpers.nvim_prog
local exec = helpers.exec
local exec_capture = helpers.exec_capture
diff --git a/test/helpers.lua b/test/helpers.lua
index ba13f06cc7..18524727a3 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -19,6 +19,7 @@ end
--- @class test.helpers
local module = {
REMOVE_THIS = {},
+ paths = Paths,
}
--- @param p string
@@ -952,6 +953,4 @@ function module.mkdir(path)
return uv.fs_mkdir(path, 493)
end
-module = vim.tbl_extend('error', module, Paths)
-
return module
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua
index 47499d98fa..ab4a59cfdb 100644
--- a/test/unit/helpers.lua
+++ b/test/unit/helpers.lua
@@ -2,8 +2,8 @@ local ffi = require('ffi')
local formatc = require('test.unit.formatc')
local Set = require('test.unit.set')
local Preprocess = require('test.unit.preprocess')
-local Paths = require('test.cmakeconfig.paths')
local global_helpers = require('test.helpers')
+local paths = global_helpers.paths
local assert = require('luassert')
local say = require('say')
@@ -15,7 +15,7 @@ local eq = global_helpers.eq
local trim = vim.trim
-- add some standard header locations
-for _, p in ipairs(Paths.include_paths) do
+for _, p in ipairs(paths.include_paths) do
Preprocess.add_to_include_path(p)
end
@@ -728,7 +728,7 @@ local function check_child_err(rd)
--- @type string
err = err .. '\nNo end of trace occurred'
end
- local cc_err, cc_emsg = pcall(check_cores, Paths.test_luajit_prg, true)
+ local cc_err, cc_emsg = pcall(check_cores, paths.test_luajit_prg, true)
if not cc_err then
--- @type string
err = err .. '\ncheck_cores failed: ' .. cc_emsg
@@ -749,7 +749,7 @@ local function itp_parent(rd, pid, allow_failure, location)
io.stderr:write('Errorred out (' .. status .. '):\n' .. tostring(emsg) .. '\n')
os.execute([[
sh -c "source ci/common/test.sh
- check_core_dumps --delete \"]] .. Paths.test_luajit_prg .. [[\""]])
+ check_core_dumps --delete \"]] .. paths.test_luajit_prg .. [[\""]])
else
error(tostring(emsg) .. '\nexit code: ' .. status)
end
@@ -797,7 +797,7 @@ local function gen_itp(it)
end
local function cppimport(path)
- return cimport(Paths.test_source_path .. '/test/includes/pre/' .. path)
+ return cimport(paths.test_source_path .. '/test/includes/pre/' .. path)
end
cimport(