Skip to content

Commit 70249ee

Browse files
committed
patch 8.2.2127: Vim9: executing user command from Vim9 script not tested
Problem: Vim9: executing user command defined in Vim9 script not tested. Solution: Add a test.
1 parent 0e12140 commit 70249ee

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

src/testdir/test_vim9_script.vim

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,6 +2381,27 @@ def Test_vim9_comment()
23812381
'Echo',
23822382
], 'E121:')
23832383
delcommand Echo
2384+
2385+
var curdir = getcwd()
2386+
CheckScriptSuccess([
2387+
'command Echo cd " comment',
2388+
'Echo',
2389+
'delcommand Echo',
2390+
])
2391+
CheckScriptSuccess([
2392+
'vim9script'
2393+
'command Echo cd # comment',
2394+
'Echo',
2395+
'delcommand Echo',
2396+
])
2397+
CheckScriptFailure([
2398+
'vim9script',
2399+
'command Echo cd " comment',
2400+
'Echo',
2401+
], 'E344:')
2402+
delcommand Echo
2403+
chdir(curdir)
2404+
23842405
CheckScriptFailure([
23852406
'vim9script',
23862407
'command Echo# comment',

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2127,
753755
/**/
754756
2126,
755757
/**/

0 commit comments

Comments
 (0)