diff src/testdir/test_vim9_disassemble.vim @ 22973:4c97c0747017 v8.2.2033

patch 8.2.2033: Vim9: :def without argument gives compilation error Commit: https://github.com/vim/vim/commit/6abdcf82859e158713a3d5aa6b1012748ea5c2a0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 22 18:15:44 2020 +0100 patch 8.2.2033: Vim9: :def without argument gives compilation error Problem: Vim9: :def without argument gives compilation error. Solution: Add the DEF instruction. (closes https://github.com/vim/vim/issues/7344)
author Bram Moolenaar <Bram@vim.org>
date Sun, 22 Nov 2020 18:30:05 +0100
parents edfbb06cd0ee
children a943b175586a
line wrap: on
line diff
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -905,6 +905,29 @@ def Test_nested_func()
         instr)
 enddef
 
+def NestedDefList()
+  def
+  def Info
+  def /Info
+  def /Info/
+enddef
+
+def Test_nested_def_list()
+   var instr = execute('disassemble NestedDefList')
+   assert_match('NestedDefList\_s*' ..
+        'def\_s*' ..
+        '\d DEF \_s*' ..
+        'def Info\_s*' ..
+        '\d DEF Info\_s*' ..
+        'def /Info\_s*' ..
+        '\d DEF /Info\_s*' ..
+        'def /Info/\_s*' ..
+        '\d DEF /Info/\_s*' ..
+        '\d PUSHNR 0\_s*' ..
+        '\d RETURN',
+        instr)
+enddef
+
 def AndOr(arg: any): string
   if arg == 1 && arg != 2 || arg == 4
     return 'yes'