mirror of
https://github.com/vim/vim.git
synced 2025-08-23 19:34:27 -04:00
patch 8.2.1508: not all debugger commands covered by tests
Problem: Not all debugger commands covered by tests. Solution: Add tests for going up/down in the stack. (Ben Jackson, closes #6765)
This commit is contained in:
parent
51b6eb47b3
commit
c63b72b6dc
@ -593,6 +593,99 @@ func Test_Backtrace_Autocmd()
|
|||||||
\ '->0 script ' .. getcwd() .. '/Xtest2.vim',
|
\ '->0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
\ 'line 1: func DoAThing()'])
|
\ 'line 1: func DoAThing()'])
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'up' )
|
||||||
|
call RunDbgCmd( buf, 'backtrace', [
|
||||||
|
\ '>backtrace',
|
||||||
|
\ ' 4 User Autocommands for "TestGlobalFunction"',
|
||||||
|
\ ' 3 function GlobalFunction[1]',
|
||||||
|
\ ' 2 CallAFunction[1]',
|
||||||
|
\ '->1 SourceAnotherFile[1]',
|
||||||
|
\ ' 0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
|
\ 'line 1: func DoAThing()' ] )
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'up' )
|
||||||
|
call RunDbgCmd( buf, 'backtrace', [
|
||||||
|
\ '>backtrace',
|
||||||
|
\ ' 4 User Autocommands for "TestGlobalFunction"',
|
||||||
|
\ ' 3 function GlobalFunction[1]',
|
||||||
|
\ '->2 CallAFunction[1]',
|
||||||
|
\ ' 1 SourceAnotherFile[1]',
|
||||||
|
\ ' 0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
|
\ 'line 1: func DoAThing()' ] )
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'up' )
|
||||||
|
call RunDbgCmd( buf, 'backtrace', [
|
||||||
|
\ '>backtrace',
|
||||||
|
\ ' 4 User Autocommands for "TestGlobalFunction"',
|
||||||
|
\ '->3 function GlobalFunction[1]',
|
||||||
|
\ ' 2 CallAFunction[1]',
|
||||||
|
\ ' 1 SourceAnotherFile[1]',
|
||||||
|
\ ' 0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
|
\ 'line 1: func DoAThing()' ] )
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'up' )
|
||||||
|
call RunDbgCmd( buf, 'backtrace', [
|
||||||
|
\ '>backtrace',
|
||||||
|
\ '->4 User Autocommands for "TestGlobalFunction"',
|
||||||
|
\ ' 3 function GlobalFunction[1]',
|
||||||
|
\ ' 2 CallAFunction[1]',
|
||||||
|
\ ' 1 SourceAnotherFile[1]',
|
||||||
|
\ ' 0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
|
\ 'line 1: func DoAThing()' ] )
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'up', [ 'frame at highest level: 4' ] )
|
||||||
|
call RunDbgCmd( buf, 'backtrace', [
|
||||||
|
\ '>backtrace',
|
||||||
|
\ '->4 User Autocommands for "TestGlobalFunction"',
|
||||||
|
\ ' 3 function GlobalFunction[1]',
|
||||||
|
\ ' 2 CallAFunction[1]',
|
||||||
|
\ ' 1 SourceAnotherFile[1]',
|
||||||
|
\ ' 0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
|
\ 'line 1: func DoAThing()' ] )
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'down' )
|
||||||
|
call RunDbgCmd( buf, 'backtrace', [
|
||||||
|
\ '>backtrace',
|
||||||
|
\ ' 4 User Autocommands for "TestGlobalFunction"',
|
||||||
|
\ '->3 function GlobalFunction[1]',
|
||||||
|
\ ' 2 CallAFunction[1]',
|
||||||
|
\ ' 1 SourceAnotherFile[1]',
|
||||||
|
\ ' 0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
|
\ 'line 1: func DoAThing()' ] )
|
||||||
|
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'down' )
|
||||||
|
call RunDbgCmd( buf, 'backtrace', [
|
||||||
|
\ '>backtrace',
|
||||||
|
\ ' 4 User Autocommands for "TestGlobalFunction"',
|
||||||
|
\ ' 3 function GlobalFunction[1]',
|
||||||
|
\ '->2 CallAFunction[1]',
|
||||||
|
\ ' 1 SourceAnotherFile[1]',
|
||||||
|
\ ' 0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
|
\ 'line 1: func DoAThing()' ] )
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'down' )
|
||||||
|
call RunDbgCmd( buf, 'backtrace', [
|
||||||
|
\ '>backtrace',
|
||||||
|
\ ' 4 User Autocommands for "TestGlobalFunction"',
|
||||||
|
\ ' 3 function GlobalFunction[1]',
|
||||||
|
\ ' 2 CallAFunction[1]',
|
||||||
|
\ '->1 SourceAnotherFile[1]',
|
||||||
|
\ ' 0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
|
\ 'line 1: func DoAThing()' ] )
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'down' )
|
||||||
|
call RunDbgCmd( buf, 'backtrace', [
|
||||||
|
\ '>backtrace',
|
||||||
|
\ ' 4 User Autocommands for "TestGlobalFunction"',
|
||||||
|
\ ' 3 function GlobalFunction[1]',
|
||||||
|
\ ' 2 CallAFunction[1]',
|
||||||
|
\ ' 1 SourceAnotherFile[1]',
|
||||||
|
\ '->0 script ' .. getcwd() .. '/Xtest2.vim',
|
||||||
|
\ 'line 1: func DoAThing()' ] )
|
||||||
|
|
||||||
|
call RunDbgCmd( buf, 'down', [ 'frame is zero' ] )
|
||||||
|
|
||||||
" step until we have another meaninfgul trace
|
" step until we have another meaninfgul trace
|
||||||
call RunDbgCmd(buf, 'step', ['line 5: func File2Function()'])
|
call RunDbgCmd(buf, 'step', ['line 5: func File2Function()'])
|
||||||
call RunDbgCmd(buf, 'step', ['line 9: call File2Function()'])
|
call RunDbgCmd(buf, 'step', ['line 9: call File2Function()'])
|
||||||
|
@ -754,6 +754,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 */
|
||||||
|
/**/
|
||||||
|
1508,
|
||||||
/**/
|
/**/
|
||||||
1507,
|
1507,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user