diff src/testdir/test_debugger.vim @ 24980:2cb78583fada v8.2.3027

patch 8.2.3027: Vim9: breakpoint in compiled function not always checked Commit: https://github.com/vim/vim/commit/2ac4b2536a40e5cd75b4ff7a3d44a282d2f4f008 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 20 20:09:42 2021 +0200 patch 8.2.3027: Vim9: breakpoint in compiled function not always checked Problem: Vim9: breakpoint in compiled function not always checked. Solution: Check for breakpoint when calling compiled function from compiled function.
author Bram Moolenaar <Bram@vim.org>
date Sun, 20 Jun 2021 20:15:02 +0200
parents 2818b8108d92
children 70f55a30f03c
line wrap: on
line diff
--- a/src/testdir/test_debugger.vim
+++ b/src/testdir/test_debugger.vim
@@ -940,7 +940,22 @@ func Test_debug_DefFunction()
       echo "here"
       echo "and"
       echo "there"
+      breakadd func 2 LocalFunc
+      LocalFunc()
     enddef
+
+    def LocalFunc()
+      echo "first"
+      echo "second"
+      breakadd func 1 LegacyFunc
+      LegacyFunc()
+    enddef
+
+    func LegacyFunc()
+      echo "legone"
+      echo "legtwo"
+    endfunc
+
     breakadd func 2 g:SomeFunc
   END
   call writefile(file, 'XtestDebug.vim')
@@ -949,6 +964,13 @@ func Test_debug_DefFunction()
 
   call RunDbgCmd(buf,':call SomeFunc()', ['line 2: echo "and"'])
   call RunDbgCmd(buf,'next', ['line 3: echo "there"'])
+  call RunDbgCmd(buf,'next', ['line 4: breakadd func 2 LocalFunc'])
+
+  " continue, next breakpoint is in LocalFunc()
+  call RunDbgCmd(buf,'cont', ['line 2: echo "second"'])
+
+  " continue, next breakpoint is in LegacyFunc()
+  call RunDbgCmd(buf,'cont', ['line 1: echo "legone"'])
 
   call RunDbgCmd(buf, 'cont')