diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/api/keymap_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/editor/completion_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/editor/tabpage_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/ui/statusline_spec.lua | 37 |
4 files changed, 47 insertions, 4 deletions
diff --git a/test/functional/api/keymap_spec.lua b/test/functional/api/keymap_spec.lua index eb2a467a8b..a93a4544ff 100644 --- a/test/functional/api/keymap_spec.lua +++ b/test/functional/api/keymap_spec.lua @@ -822,7 +822,7 @@ describe('nvim_set_keymap, nvim_del_keymap', function() vim.api.nvim_set_keymap ('n', 'asdf', '', {callback = function() print('jkl;') end }) ]] assert.truthy(string.match(exec_lua[[return vim.api.nvim_exec(':nmap asdf', true)]], - "^\nn asdf <Lua function %d+>")) + "^\nn asdf <Lua %d+>")) end) it ('mapcheck() returns lua mapping correctly', function() @@ -830,7 +830,7 @@ describe('nvim_set_keymap, nvim_del_keymap', function() vim.api.nvim_set_keymap ('n', 'asdf', '', {callback = function() print('jkl;') end }) ]] assert.truthy(string.match(funcs.mapcheck('asdf', 'n'), - "^<Lua function %d+>")) + "^<Lua %d+>")) end) it ('maparg() returns lua mapping correctly', function() @@ -838,7 +838,7 @@ describe('nvim_set_keymap, nvim_del_keymap', function() vim.api.nvim_set_keymap ('n', 'asdf', '', {callback = function() print('jkl;') end }) ]] assert.truthy(string.match(funcs.maparg('asdf', 'n'), - "^<Lua function %d+>")) + "^<Lua %d+>")) local mapargs = funcs.maparg('asdf', 'n', false, true) assert(type(mapargs.callback) == 'number', 'callback is not luaref number') mapargs.callback = nil diff --git a/test/functional/editor/completion_spec.lua b/test/functional/editor/completion_spec.lua index e27da0947f..6cdac3c079 100644 --- a/test/functional/editor/completion_spec.lua +++ b/test/functional/editor/completion_spec.lua @@ -1253,4 +1253,10 @@ describe('completion', function() feed('ifoo#<C-X><C-U>') assert_alive() end) + + it('does not crash when using i_CTRL-X_CTRL-V to complete non-existent colorscheme', function() + feed('icolorscheme NOSUCHCOLORSCHEME<C-X><C-V>') + expect('colorscheme NOSUCHCOLORSCHEME') + assert_alive() + end) end) diff --git a/test/functional/editor/tabpage_spec.lua b/test/functional/editor/tabpage_spec.lua index 7dd0b9f154..849a02c28b 100644 --- a/test/functional/editor/tabpage_spec.lua +++ b/test/functional/editor/tabpage_spec.lua @@ -59,7 +59,7 @@ describe('tabpage', function() screen:set_default_attr_ids({ [0] = {bold = true, foreground = Screen.colors.Blue}, [1] = {bold = true, reverse = true}, -- StatusLine - [2] = {reverse = true}, -- StatusLineNC, TabLineFill + [2] = {reverse = true}, -- TabLineFill [3] = {bold = true}, -- TabLineSel [4] = {background = Screen.colors.LightGrey, underline = true}, -- TabLine [5] = {bold = true, foreground = Screen.colors.Magenta}, diff --git a/test/functional/ui/statusline_spec.lua b/test/functional/ui/statusline_spec.lua index 69a2d2f4ed..f3735c8e4c 100644 --- a/test/functional/ui/statusline_spec.lua +++ b/test/functional/ui/statusline_spec.lua @@ -407,3 +407,40 @@ it('statusline does not crash if it has Arabic characters #19447', function() command('redraw!') assert_alive() end) + +it('statusline is redrawn with :resize from <Cmd> mapping #19629', function() + clear() + local screen = Screen.new(40, 8) + screen:set_default_attr_ids({ + [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [1] = {bold = true, reverse = true}, -- StatusLine + }) + screen:attach() + exec([[ + set laststatus=2 + nnoremap <Up> <cmd>resize -1<CR> + nnoremap <Down> <cmd>resize +1<CR> + ]]) + feed('<Up>') + screen:expect([[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {1:[No Name] }| + | + | + ]]) + feed('<Down>') + screen:expect([[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {1:[No Name] }| + | + ]]) +end) |