Patch 8.2.1508
Problem:    Not all debugger commands covered by tests.
Solution:   Add tests for going up/down in the stack. (Ben Jackson,
            closes #6765)
Files:      src/testdir/test_debugger.vim


*** ../vim-8.2.1507/src/testdir/test_debugger.vim       2020-08-13 
19:19:59.917998219 +0200
--- src/testdir/test_debugger.vim       2020-08-22 16:02:59.161988304 +0200
***************
*** 593,598 ****
--- 593,691 ----
          \ '->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' )
+   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
    call RunDbgCmd(buf, 'step', ['line 5: func File2Function()'])
    call RunDbgCmd(buf, 'step', ['line 9: call File2Function()'])
*** ../vim-8.2.1507/src/version.c       2020-08-22 15:19:13.932593710 +0200
--- src/version.c       2020-08-22 16:04:16.765580639 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1508,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
266. You hear most of your jokes via e-mail instead of in person.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202008221405.07ME5NgI721810%40masaka.moolenaar.net.

Raspunde prin e-mail lui