aboutsummaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-01-17 13:46:55 +0000
committerGitHub <noreply@github.com>2024-01-17 13:46:55 +0000
commite855a80c72ed89815255bb6ff38bff27e58e523f (patch)
treeecb2245caed90d99785df194199cf971284852ee /test/unit
parentd88814ef68b3f2ad3ed005ee0683eff063b017a6 (diff)
parent14b7ffcf89bc448b626df3d9e19f9f5a3682ae2b (diff)
downloadrneovim-e855a80c72ed89815255bb6ff38bff27e58e523f.tar.gz
rneovim-e855a80c72ed89815255bb6ff38bff27e58e523f.tar.bz2
rneovim-e855a80c72ed89815255bb6ff38bff27e58e523f.zip
Merge pull request #27024 from lewis6991/test_followup
test: big cleanup followup + typing
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/helpers.lua10
-rw-r--r--test/unit/viml/expressions/parser_spec.lua4
-rw-r--r--test/unit/viml/expressions/parser_tests.lua4
3 files changed, 8 insertions, 10 deletions
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(
diff --git a/test/unit/viml/expressions/parser_spec.lua b/test/unit/viml/expressions/parser_spec.lua
index ae12136a5c..c7d3f8532f 100644
--- a/test/unit/viml/expressions/parser_spec.lua
+++ b/test/unit/viml/expressions/parser_spec.lua
@@ -14,8 +14,8 @@ local ffi = helpers.ffi
local neq = helpers.neq
local eq = helpers.eq
local mergedicts_copy = helpers.mergedicts_copy
-local format_string = helpers.format_string
-local format_luav = helpers.format_luav
+local format_string = require('test.format_string').format_string
+local format_luav = require('test.format_string').format_luav
local intchar2lua = helpers.intchar2lua
local dictdiff = helpers.dictdiff
diff --git a/test/unit/viml/expressions/parser_tests.lua b/test/unit/viml/expressions/parser_tests.lua
index a10e1098b5..aa2bf740de 100644
--- a/test/unit/viml/expressions/parser_tests.lua
+++ b/test/unit/viml/expressions/parser_tests.lua
@@ -1,6 +1,4 @@
-local global_helpers = require('test.helpers')
-
-local REMOVE_THIS = global_helpers.REMOVE_THIS
+local REMOVE_THIS = vim.NIL
return function(itp, _check_parsing, hl, fmtn)
local function check_parsing(...)