diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-30 20:35:25 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-30 20:35:25 +0000 |
commit | 1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch) | |
tree | cd08258054db80bb9a11b1061bb091c70b76926a /test/functional/editor/mode_cmdline_spec.lua | |
parent | eaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-aucmd_textputpost.tar.gz rneovim-aucmd_textputpost.tar.bz2 rneovim-aucmd_textputpost.zip |
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to 'test/functional/editor/mode_cmdline_spec.lua')
-rw-r--r-- | test/functional/editor/mode_cmdline_spec.lua | 28 |
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)) |