diff src/testdir/test_vim9_cmd.vim @ 28934:a712ea475390 v8.2.4989

patch 8.2.4989: cannot specify a function name for :defcompile Commit: https://github.com/vim/vim/commit/f79d9dd43f6fe05711d7e2616ab4b8bde2ccb089 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 21 15:39:02 2022 +0100 patch 8.2.4989: cannot specify a function name for :defcompile Problem: Cannot specify a function name for :defcompile. Solution: Implement a function name argument for :defcompile.
author Bram Moolenaar <Bram@vim.org>
date Sat, 21 May 2022 16:45:03 +0200
parents 228154db3ce6
children 691c8adef6f3
line wrap: on
line diff
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -83,6 +83,16 @@ def Test_vim9cmd()
   v9.CheckScriptSuccess(lines)
 enddef
 
+def Test_defcompile_fails()
+  assert_fails('defcompile NotExists', 'E1061:')
+  assert_fails('defcompile debug debug Test_defcompile_fails', 'E488:')
+  assert_fails('defcompile profile profile Test_defcompile_fails', 'E488:')
+enddef
+
+defcompile Test_defcompile_fails
+defcompile debug Test_defcompile_fails
+defcompile profile Test_defcompile_fails
+
 def Test_cmdmod_execute()
   # "legacy" applies not only to the "exe" argument but also to the commands
   var lines =<< trim END