diff src/testdir/test_vim9_script.vim @ 23183:4d5d12138b36 v8.2.2137

patch 8.2.2137: Vim9: :echo and :execute give error for empty argument Commit: https://github.com/vim/vim/commit/e4984290870565a2413cca660b0131f4702b7665 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 13 14:19:25 2020 +0100 patch 8.2.2137: Vim9: :echo and :execute give error for empty argument Problem: Vim9: :echo and :execute give error for empty argument. Solution: Ignore an empty argument. (closes https://github.com/vim/vim/issues/7468)
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Dec 2020 14:30:03 +0100
parents 821701ecbde7
children 055fa9db6f39
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -620,7 +620,7 @@ def Test_try_catch_fails()
   CheckDefFailure(['if 1', 'endtry'], 'E171:')
   CheckDefFailure(['try', 'echo 1', 'endtry'], 'E1032:')
 
-  CheckDefFailure(['throw'], 'E1015:')
+  CheckDefFailure(['throw'], 'E1143:')
   CheckDefFailure(['throw xxx'], 'E1001:')
 enddef
 
@@ -1719,6 +1719,10 @@ def Test_nested_if()
 enddef
 
 def Test_execute_cmd()
+  # missing argument is ignored
+  execute
+  execute # comment
+
   new
   setline(1, 'default')
   execute 'setline(1, "execute-string")'
@@ -2137,9 +2141,6 @@ def Test_vim9_comment()
       'vim9script',
       'exe "echo"# something',
       ], 'E121:')
-  CheckDefFailure([
-      'exe # comment',
-      ], 'E1015:')
   CheckScriptFailure([
       'vim9script',
       'exe# something',
@@ -2164,7 +2165,7 @@ def Test_vim9_comment()
       '  throw#comment',
       'catch',
       'endtry',
-      ], 'E1015:')
+      ], 'E1143:')
   CheckDefFailure([
       'try',
       '  throw "yes"#comment',