aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/core/startup_spec.lua6
-rw-r--r--test/functional/terminal/helpers.lua8
-rw-r--r--test/functional/terminal/highlight_spec.lua4
-rw-r--r--test/functional/terminal/tui_spec.lua24
4 files changed, 37 insertions, 5 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua
index 94ec3d4907..1460870774 100644
--- a/test/functional/core/startup_spec.lua
+++ b/test/functional/core/startup_spec.lua
@@ -866,7 +866,11 @@ describe('user config init', function()
local screen = Screen.new(50, 8)
screen:attach()
- funcs.termopen({nvim_prog})
+ funcs.termopen({nvim_prog}, {
+ env = {
+ VIMRUNTIME = os.getenv('VIMRUNTIME'),
+ },
+ })
screen:expect({ any = pesc('[i]gnore, (v)iew, (d)eny, (a)llow:') })
-- `i` to enter Terminal mode, `a` to allow
feed('ia')
diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua
index 78c9218679..9566079389 100644
--- a/test/functional/terminal/helpers.lua
+++ b/test/functional/terminal/helpers.lua
@@ -127,7 +127,13 @@ end
local function setup_child_nvim(args, opts)
opts = opts or {}
local argv = { nvim_prog, unpack(args) }
- return screen_setup(0, argv, opts.cols, opts.env)
+
+ local env = opts.env or {}
+ if not env.VIMRUNTIME then
+ env.VIMRUNTIME = os.getenv('VIMRUNTIME')
+ end
+
+ return screen_setup(0, argv, opts.cols, env)
end
return {
diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua
index 4754d14052..84bd7a2d4a 100644
--- a/test/functional/terminal/highlight_spec.lua
+++ b/test/functional/terminal/highlight_spec.lua
@@ -147,6 +147,10 @@ it(':terminal highlight has lower precedence than editor #9964', function()
'+hi Normal ctermfg=Blue ctermbg=Yellow',
'+norm! ichild nvim',
'+norm! oline 2',
+ }, {
+ env = {
+ VIMRUNTIME = os.getenv('VIMRUNTIME'),
+ },
})
screen:expect([[
{N_child:^child nvim }|
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 362f1fc1ee..5c1f3e7c65 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -24,6 +24,7 @@ local funcs = helpers.funcs
local meths = helpers.meths
local is_ci = helpers.is_ci
local is_os = helpers.is_os
+local is_arch = helpers.is_arch
local new_pipename = helpers.new_pipename
local spawn_argv = helpers.spawn_argv
local set_session = helpers.set_session
@@ -1829,8 +1830,18 @@ describe('TUI', function()
[5] = {bold = true, reverse = true},
})
screen:attach()
+ funcs.termopen({
+ nvim_prog,
+ '--clean',
+ '--cmd', 'colorscheme vim',
+ '--cmd', 'set notermguicolors',
+ '--cmd', 'let start = reltime() | while v:true | if reltimefloat(reltime(start)) > 2 | break | endif | endwhile',
+ }, {
+ env = {
+ VIMRUNTIME = os.getenv('VIMRUNTIME'),
+ },
+ })
exec([[
- call termopen([v:progpath, '--clean', '--cmd', 'set notermguicolors', '--cmd', 'colorscheme vim', '--cmd', 'let start = reltime() | while v:true | if reltimefloat(reltime(start)) > 2 | break | endif | endwhile'])
sleep 500m
vs new
]])
@@ -1849,6 +1860,9 @@ describe('TUI', function()
end)
it('argv[0] can be overridden #23953', function()
+ if is_arch('aarch64') then
+ pending('execl does not work on aarch64')
+ end
if not exec_lua('return pcall(require, "ffi")') then
pending('missing LuaJIT FFI')
end
@@ -1887,8 +1901,12 @@ describe('TUI', function()
finally(function()
os.remove('testF')
end)
- local screen = thelpers.screen_setup(0, nvim_prog
- ..' -u NONE -i NONE --cmd \'set noswapfile noshowcmd noruler\' --cmd \'normal iabc\' > /dev/null 2>&1 && cat testF && rm testF')
+ local screen = thelpers.screen_setup(0,
+ string.format(
+ 'VIMRUNTIME=%s %s -u NONE -i NONE --cmd \'set noswapfile noshowcmd noruler\' --cmd \'normal iabc\' > /dev/null 2>&1 && cat testF && rm testF',
+ os.getenv('VIMRUNTIME'),
+ nvim_prog
+ ))
feed_data(':w testF\n:q\n')
screen:expect([[
:w testF |