aboutsummaryrefslogtreecommitdiff
path: root/test/functional/testterm.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
committerJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
commitd5f194ce780c95821a855aca3c19426576d28ae0 (patch)
treed45f461b19f9118ad2bb1f440a7a08973ad18832 /test/functional/testterm.lua
parentc5d770d311841ea5230426cc4c868e8db27300a8 (diff)
parent44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff)
downloadrneovim-d5f194ce780c95821a855aca3c19426576d28ae0.tar.gz
rneovim-d5f194ce780c95821a855aca3c19426576d28ae0.tar.bz2
rneovim-d5f194ce780c95821a855aca3c19426576d28ae0.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309HEADrahm
Diffstat (limited to 'test/functional/testterm.lua')
-rw-r--r--test/functional/testterm.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/functional/testterm.lua b/test/functional/testterm.lua
index 3aadcc59a7..17209d947e 100644
--- a/test/functional/testterm.lua
+++ b/test/functional/testterm.lua
@@ -29,6 +29,10 @@ function M.feed_termcode(data)
M.feed_data('\027' .. data)
end
+function M.feed_csi(data)
+ M.feed_termcode('[' .. data)
+end
+
function M.make_lua_executor(session)
return function(code, ...)
local status, rv = session:request('nvim_exec_lua', code, { ... })
@@ -78,6 +82,9 @@ end
function M.set_undercurl()
M.feed_termcode('[4:3m')
end
+function M.set_reverse()
+ M.feed_termcode('[7m')
+end
function M.set_strikethrough()
M.feed_termcode('[9m')
end
@@ -108,7 +115,6 @@ function M.setup_screen(extra_rows, cmd, cols, env, screen_opts)
cols = cols and cols or 50
api.nvim_command('highlight TermCursor cterm=reverse')
- api.nvim_command('highlight TermCursorNC ctermbg=11')
api.nvim_command('highlight StatusLineTerm ctermbg=2 ctermfg=0')
api.nvim_command('highlight StatusLineTermNC ctermbg=2 ctermfg=8')
@@ -135,7 +141,7 @@ function M.setup_screen(extra_rows, cmd, cols, env, screen_opts)
})
api.nvim_command('enew')
- api.nvim_call_function('termopen', { cmd, env and { env = env } or nil })
+ api.nvim_call_function('jobstart', { cmd, { term = true, env = (env and env or nil) } })
api.nvim_input('<CR>')
local vim_errmsg = api.nvim_eval('v:errmsg')
if vim_errmsg and '' ~= vim_errmsg then
@@ -154,7 +160,7 @@ function M.setup_screen(extra_rows, cmd, cols, env, screen_opts)
local empty_line = (' '):rep(cols)
local expected = {
'tty ready' .. (' '):rep(cols - 9),
- '{1: }' .. (' '):rep(cols - 1),
+ '^' .. (' '):rep(cols),
empty_line,
empty_line,
empty_line,