mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
vim-patch:9.1.0877: tests: missing test for termdebug + decimal signs
Problem: tests: missing test for termdebug + decimal signs
Solution: Add a termdebug test (Ubaldo Tiberi)
closes: vim/vim#16081
b5c1557323
Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
This commit is contained in:
@ -177,6 +177,62 @@ func Test_termdebug_basic()
|
|||||||
%bw!
|
%bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_termdebug_decimal_breakpoints()
|
||||||
|
let bin_name = 'XTD_decimal'
|
||||||
|
let src_name = bin_name .. '.c'
|
||||||
|
call s:generate_files(bin_name)
|
||||||
|
|
||||||
|
exe "edit " .. src_name
|
||||||
|
|
||||||
|
let g:termdebug_config = {}
|
||||||
|
let g:termdebug_config['sign_decimal'] = 1
|
||||||
|
|
||||||
|
exe "Termdebug " .. bin_name
|
||||||
|
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!
|
||||||
|
|
||||||
|
let i = 2
|
||||||
|
while i <= 258
|
||||||
|
Break
|
||||||
|
call Nterm_wait(gdb_buf)
|
||||||
|
if i == 2
|
||||||
|
call WaitForAssert({-> assert_equal(sign_getdefined('debugBreakpoint2.0')[0].text, '02')})
|
||||||
|
endif
|
||||||
|
if i == 10
|
||||||
|
call WaitForAssert({-> assert_equal(sign_getdefined('debugBreakpoint10.0')[0].text, '10')})
|
||||||
|
endif
|
||||||
|
if i == 168
|
||||||
|
call WaitForAssert({-> assert_equal(sign_getdefined('debugBreakpoint168.0')[0].text, '9+')})
|
||||||
|
endif
|
||||||
|
if i == 255
|
||||||
|
call WaitForAssert({-> assert_equal(sign_getdefined('debugBreakpoint255.0')[0].text, '9+')})
|
||||||
|
endif
|
||||||
|
if i == 256
|
||||||
|
call WaitForAssert({-> assert_equal(sign_getdefined('debugBreakpoint256.0')[0].text, '9+')})
|
||||||
|
endif
|
||||||
|
if i == 258
|
||||||
|
call WaitForAssert({-> assert_equal(sign_getdefined('debugBreakpoint258.0')[0].text, '9+')})
|
||||||
|
endif
|
||||||
|
let i += 1
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
wincmd t
|
||||||
|
quit!
|
||||||
|
redraw!
|
||||||
|
call WaitForAssert({-> assert_equal(1, winnr('$'))})
|
||||||
|
call assert_equal([], sign_getplaced('', #{group: 'TermDebug'})[0].signs)
|
||||||
|
|
||||||
|
call s:cleanup_files(bin_name)
|
||||||
|
%bw!
|
||||||
|
|
||||||
|
unlet g:termdebug_config
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_termdebug_tbreak()
|
func Test_termdebug_tbreak()
|
||||||
let g:test_is_flaky = 1
|
let g:test_is_flaky = 1
|
||||||
let bin_name = 'XTD_tbreak'
|
let bin_name = 'XTD_tbreak'
|
||||||
|
Reference in New Issue
Block a user