From 842ca1fd5cfbce99da4b8c3c8a419786e43727d8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 8 Jul 2025 06:55:25 +0800 Subject: [PATCH] vim-patch:9.1.1519: tests: Test_termdebug_decimal_breakpoints() may fail Problem: Test_termdebug_decimal_breakpoints() fails with List index out of range, because when adding the second breakpoint, the cursor is still on the very first line (a header include line) and therefore gdb refuses to set the breakpoint with: `msg="No compiled code for line 1 in file XTD_decimal.c"` Solution: Run the program, so that it will break at the very first defined breakpoint and then once we are in the program, set further breakpoints closes: vim/vim#17689 https://github.com/vim/vim/commit/faed074ab7dee8d1c89978090a674008c50f65d8 Co-authored-by: Christian Brabandt --- test/old/testdir/test_plugin_termdebug.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/old/testdir/test_plugin_termdebug.vim b/test/old/testdir/test_plugin_termdebug.vim index 78bf000d20..bcc00a6e20 100644 --- a/test/old/testdir/test_plugin_termdebug.vim +++ b/test/old/testdir/test_plugin_termdebug.vim @@ -188,13 +188,16 @@ func Test_termdebug_decimal_breakpoints() let g:termdebug_config['sign_decimal'] = 1 exe "Termdebug " .. bin_name - call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) + " Nvim: g:termdebug_is_running is not ported yet + " call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) call WaitForAssert({-> assert_equal(3, winnr('$'))}) let gdb_buf = winbufnr(1) wincmd b Break 9 call Nterm_wait(gdb_buf) redraw! + Run + call Nterm_wait(gdb_buf, 400) let i = 2 while i <= 258