aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/highlight_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-01-04 06:29:13 -0800
committerGitHub <noreply@github.com>2025-01-04 06:29:13 -0800
commit975c2124a6e057e3f50ca5b2ad56572a39c633d9 (patch)
treee4fe80b5d9625c785a40aa66173808dcc2fe2941 /test/functional/terminal/highlight_spec.lua
parent7ddadd0feec663fcd9af1f30f055018a872cf2ba (diff)
downloadrneovim-975c2124a6e057e3f50ca5b2ad56572a39c633d9.tar.gz
rneovim-975c2124a6e057e3f50ca5b2ad56572a39c633d9.tar.bz2
rneovim-975c2124a6e057e3f50ca5b2ad56572a39c633d9.zip
test: use spawn_wait() instead of system() #31852
Problem: Tests that need to check `nvim` CLI behavior (no RPC session) create their own ad-hoc `system()` wrappers. Solution: - Use `n.spawn_wait` instead of `system()`. - Bonus: this also improves the tests by explicitly checking for `stdout` or `stderr`. And if a signal is raised, `ProcStream.status` will reflect it.
Diffstat (limited to 'test/functional/terminal/highlight_spec.lua')
-rw-r--r--test/functional/terminal/highlight_spec.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua
index c43d139f70..0afbd010f7 100644
--- a/test/functional/terminal/highlight_spec.lua
+++ b/test/functional/terminal/highlight_spec.lua
@@ -6,7 +6,6 @@ local tt = require('test.functional.testterm')
local feed, clear = n.feed, n.clear
local api = n.api
local testprg, command = n.testprg, n.command
-local nvim_prog_abs = n.nvim_prog_abs
local fn = n.fn
local nvim_set = n.nvim_set
local is_os = t.is_os
@@ -151,7 +150,7 @@ it(':terminal highlight has lower precedence than editor #9964', function()
})
-- Child nvim process in :terminal (with cterm colors).
fn.jobstart({
- nvim_prog_abs(),
+ n.nvim_prog,
'-n',
'-u',
'NORC',