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: #16081 Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
e2c27ca8ef
commit
b5c1557323
@ -179,6 +179,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 term_wait(gdb_buf)
|
||||||
|
redraw!
|
||||||
|
|
||||||
|
let i = 2
|
||||||
|
while i <= 258
|
||||||
|
Break
|
||||||
|
call term_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'
|
||||||
|
|||||||
@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
877,
|
||||||
/**/
|
/**/
|
||||||
876,
|
876,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user