aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-06-15 10:18:43 +0800
committerGitHub <noreply@github.com>2022-06-15 10:18:43 +0800
commit1493efdc141f0bc0a472b60f87927b3d5ab59f5e (patch)
tree69558b6da4e67f23ab64659acfd86b29b7e82eff
parent6de7f32d52822c3c09d24720efc65efe97a6e698 (diff)
downloadrneovim-1493efdc141f0bc0a472b60f87927b3d5ab59f5e.tar.gz
rneovim-1493efdc141f0bc0a472b60f87927b3d5ab59f5e.tar.bz2
rneovim-1493efdc141f0bc0a472b60f87927b3d5ab59f5e.zip
test: correct check for v:errmsg in inccommand test (#18968)
After the first separator is typed v:errmsg can be set. Check for its value before typing the first separator.
-rw-r--r--test/functional/ui/inccommand_spec.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua
index dfbe724026..98ed564966 100644
--- a/test/functional/ui/inccommand_spec.lua
+++ b/test/functional/ui/inccommand_spec.lua
@@ -2947,10 +2947,9 @@ it(':substitute with inccommand, allows :redraw before first separator is typed
]])
end)
-it(':substitute with inccommand, does nothing if range contains invalid marks', function()
+it(':substitute with inccommand, does not crash if range contains invalid marks', function()
local screen = Screen.new(30, 6)
clear()
- command('set undolevels=-1')
common_setup(screen, 'split', 'test')
feed([[:'a,'bs]])
screen:expect([[
@@ -2961,6 +2960,8 @@ it(':substitute with inccommand, does nothing if range contains invalid marks',
{15:~ }|
:'a,'bs^ |
]])
+ -- v:errmsg shouldn't be set either before the first separator is typed
+ eq('', eval('v:errmsg'))
feed('/')
screen:expect([[
test |
@@ -2970,7 +2971,6 @@ it(':substitute with inccommand, does nothing if range contains invalid marks',
{15:~ }|
:'a,'bs/^ |
]])
- eq('', eval('v:errmsg'))
end)
it(":substitute doesn't crash with inccommand, if undo is empty #12932", function()