diff --git a/test/old/testdir/test_usercommands.vim b/test/old/testdir/test_usercommands.vim index c4bc45aa3d..046e0b1874 100644 --- a/test/old/testdir/test_usercommands.vim +++ b/test/old/testdir/test_usercommands.vim @@ -1,5 +1,8 @@ " Tests for user defined commands +source check.vim +source screendump.vim + " Test for in user defined commands function Test_cmdmods() let g:mods = '' @@ -362,6 +365,14 @@ func Test_CmdCompletion() call feedkeys(":com MyCmd chist\\\"\", 'tx') call assert_equal("\"com MyCmd chistory", @:) + " delete the Check commands to avoid them showing up + call feedkeys(":com Check\\\"\", 'tx') + let cmds = substitute(@:, '"com ', '', '')->split() + for cmd in cmds + exe 'delcommand ' .. cmd + endfor + delcommand MissingFeature + command! DoCmd1 : command! DoCmd2 : call feedkeys(":com \\\"\", 'tx') @@ -715,7 +726,7 @@ func Test_recursive_define() call DefCmd('Command') let name = 'Command' - while len(name) < 30 + while len(name) <= 30 exe 'delcommand ' .. name let name ..= 'x' endwhile