aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-13 06:44:56 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-11-13 06:46:17 +0800
commit7e789137e9d5cc6713be5a2abde5c10b5713de82 (patch)
tree8778ba074c7dd605d9f3016b71490be74be5bbed
parent0bca5bff534af515a1e1e831c01bd53b0a08a56d (diff)
downloadrneovim-7e789137e9d5cc6713be5a2abde5c10b5713de82.tar.gz
rneovim-7e789137e9d5cc6713be5a2abde5c10b5713de82.tar.bz2
rneovim-7e789137e9d5cc6713be5a2abde5c10b5713de82.zip
vim-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. https://github.com/vim/vim/commit/2ac4b2536a40e5cd75b4ff7a3d44a282d2f4f008 Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--test/old/testdir/test_debugger.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/old/testdir/test_debugger.vim b/test/old/testdir/test_debugger.vim
index f98b718c32..90f7b4abd0 100644
--- a/test/old/testdir/test_debugger.vim
+++ b/test/old/testdir/test_debugger.vim
@@ -980,7 +980,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')
@@ -989,6 +1004,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')