aboutsummaryrefslogtreecommitdiff
path: root/test/functional/editor/mode_cmdline_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-29 21:52:58 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-29 21:52:58 +0000
commit931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch)
treed8c1843a95da5ea0bb4acc09f7e37843d9995c86 /test/functional/editor/mode_cmdline_spec.lua
parent142d9041391780ac15b89886a54015fdc5c73995 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-userreg.tar.gz
rneovim-userreg.tar.bz2
rneovim-userreg.zip
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'test/functional/editor/mode_cmdline_spec.lua')
-rw-r--r--test/functional/editor/mode_cmdline_spec.lua28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/functional/editor/mode_cmdline_spec.lua b/test/functional/editor/mode_cmdline_spec.lua
index 50cc5e17ee..d34b5a1a28 100644
--- a/test/functional/editor/mode_cmdline_spec.lua
+++ b/test/functional/editor/mode_cmdline_spec.lua
@@ -1,9 +1,11 @@
-- Cmdline-mode tests.
local helpers = require('test.functional.helpers')(after_each)
+local Screen = require('test.functional.ui.screen')
local clear, insert, funcs, eq, feed =
helpers.clear, helpers.insert, helpers.funcs, helpers.eq, helpers.feed
local eval = helpers.eval
+local command = helpers.command
local meths = helpers.meths
describe('cmdline', function()
@@ -43,6 +45,30 @@ describe('cmdline', function()
eq('"<C-J><C-@><C-[><C-S-M><M-C-I><C-D-J>', eval('@:'))
end)
+ it('redraws statusline when toggling overstrike', function()
+ local screen = Screen.new(60, 4)
+ screen:set_default_attr_ids({
+ [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
+ [1] = {reverse = true, bold = true}, -- StatusLine
+ })
+ screen:attach()
+ command('set laststatus=2 statusline=%!mode(1)')
+ feed(':')
+ screen:expect{grid=[[
+ |
+ {0:~ }|
+ {1:c }|
+ :^ |
+ ]]}
+ feed('<Insert>')
+ screen:expect{grid=[[
+ |
+ {0:~ }|
+ {1:cr }|
+ :^ |
+ ]]}
+ end)
+
describe('history', function()
it('correctly clears start of the history', function()
-- Regression test: check absence of the memory leak when clearing start of
@@ -55,7 +81,7 @@ describe('cmdline', function()
it('correctly clears end of the history', function()
-- Regression test: check absence of the memory leak when clearing end of
-- the history using ex_getln.c/clr_history().
- meths.set_option('history', 1)
+ meths.set_option_value('history', 1, {})
eq(1, funcs.histadd(':', 'foo'))
eq(1, funcs.histdel(':'))
eq('', funcs.histget(':', -1))