]> granicus.if.org Git - vim/commitdiff
patch 8.2.2127: Vim9: executing user command from Vim9 script not tested v8.2.2127
authorBram Moolenaar <Bram@vim.org>
Thu, 10 Dec 2020 20:01:30 +0000 (21:01 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 10 Dec 2020 20:01:30 +0000 (21:01 +0100)
Problem:    Vim9: executing user command defined in Vim9 script not tested.
Solution:   Add a test.

src/testdir/test_vim9_script.vim
src/version.c

index 72a373a31c8b8eca24a6142f0c5681ffb4577f12..bb070cacdc03e22871ab811229faf093dd97c8ae 100644 (file)
@@ -2381,6 +2381,27 @@ def Test_vim9_comment()
       'Echo',
       ], 'E121:')
   delcommand Echo
+
+  var curdir = getcwd()
+  CheckScriptSuccess([
+      'command Echo cd " comment',
+      'Echo',
+      'delcommand Echo',
+      ])
+  CheckScriptSuccess([
+      'vim9script'
+      'command Echo cd # comment',
+      'Echo',
+      'delcommand Echo',
+      ])
+  CheckScriptFailure([
+      'vim9script',
+      'command Echo cd " comment',
+      'Echo',
+      ], 'E344:')
+  delcommand Echo
+  chdir(curdir)
+
   CheckScriptFailure([
       'vim9script',
       'command Echo# comment',
index 491ea90042c2ee0871a7d39332033392b92112e6..1a534ee2112c5266823e6c4a8539f4eb560e4ce1 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2127,
 /**/
     2126,
 /**/