diff options
author | Gregory Anders <greg@gpanders.com> | 2023-12-05 14:26:46 -0800 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2023-12-06 10:38:44 -0800 |
commit | a5a346678a8211ea07f318de42e557ad3909f65e (patch) | |
tree | 7582752e1e60dbe8accd0e22ecedd2d814fe525f /test/functional/terminal/cursor_spec.lua | |
parent | 2613ba5000d4c0d9b15e2eec2d2b97615575925e (diff) | |
download | rneovim-a5a346678a8211ea07f318de42e557ad3909f65e.tar.gz rneovim-a5a346678a8211ea07f318de42e557ad3909f65e.tar.bz2 rneovim-a5a346678a8211ea07f318de42e557ad3909f65e.zip |
test: set notermguicolors in tests
Set 'notermguicolors' in tests which spawn a child Nvim process to force
existing tests to use 16 colors. Also refactor the child process
invocation to make things a little bit less messy.
Diffstat (limited to 'test/functional/terminal/cursor_spec.lua')
-rw-r--r-- | test/functional/terminal/cursor_spec.lua | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/test/functional/terminal/cursor_spec.lua b/test/functional/terminal/cursor_spec.lua index 95081b7189..37bb0ee817 100644 --- a/test/functional/terminal/cursor_spec.lua +++ b/test/functional/terminal/cursor_spec.lua @@ -3,7 +3,6 @@ local Screen = require('test.functional.ui.screen') local thelpers = require('test.functional.terminal.helpers') local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim local testprg, command = helpers.testprg, helpers.command -local nvim_prog = helpers.nvim_prog local eq, eval = helpers.eq, helpers.eval local matches = helpers.matches local poke_eventloop = helpers.poke_eventloop @@ -184,10 +183,18 @@ describe('buffer cursor position is correct in terminal without number column', local screen local function setup_ex_register(str) - screen = thelpers.screen_setup(0, '["'..nvim_prog - ..[[", "-u", "NONE", "-i", "NONE", "-E", "--cmd", "let @r = ']]..str..[['", ]] + screen = thelpers.setup_child_nvim({ + '-u', 'NONE', + '-i', 'NONE', + '-E', + '--cmd', string.format('let @r = "%s"', str), -- <Left> and <Right> don't always work - ..[["--cmd", "cnoremap <C-X> <Left>", "--cmd", "cnoremap <C-O> <Right>"]]..']', 70) + '--cmd', 'cnoremap <C-X> <Left>', + '--cmd', 'cnoremap <C-O> <Right>', + '--cmd', 'set notermguicolors', + }, { + cols = 70, + }) screen:set_default_attr_ids({ [1] = {foreground = 253, background = 11}; [3] = {bold = true}, @@ -570,10 +577,18 @@ describe('buffer cursor position is correct in terminal with number column', fun local screen local function setup_ex_register(str) - screen = thelpers.screen_setup(0, '["'..nvim_prog - ..[[", "-u", "NONE", "-i", "NONE", "-E", "--cmd", "let @r = ']]..str..[['", ]] + screen = thelpers.setup_child_nvim({ + '-u', 'NONE', + '-i', 'NONE', + '-E', + '--cmd', string.format('let @r = "%s"', str), -- <Left> and <Right> don't always work - ..[["--cmd", "cnoremap <C-X> <Left>", "--cmd", "cnoremap <C-O> <Right>"]]..']', 70) + '--cmd', 'cnoremap <C-X> <Left>', + '--cmd', 'cnoremap <C-O> <Right>', + '--cmd', 'set notermguicolors', + }, { + cols = 70, + }) screen:set_default_attr_ids({ [1] = {foreground = 253, background = 11}; [3] = {bold = true}, |