Patch 7.4.981
Problem:    An error in a test script goes unnoticed.
Solution:   Source the test script inside try/catch. (Hirohito Higashi)
Files:      src/testdir/runtest.vim


*** ../vim-7.4.980/src/testdir/runtest.vim      2015-12-03 17:21:24.520567777 
+0100
--- src/testdir/runtest.vim     2015-12-28 14:30:16.307812720 +0100
***************
*** 21,29 ****
  " It will be called after each Test_ function.
  
  " Without the +eval feature we can't run these tests, bail out.
! if 0
!   quit!
! endif
  
  " Check that the screen size is at least 24 x 80 characters.
  if &lines < 24 || &columns < 80 
--- 21,27 ----
  " It will be called after each Test_ function.
  
  " Without the +eval feature we can't run these tests, bail out.
! so small.vim
  
  " Check that the screen size is at least 24 x 80 characters.
  if &lines < 24 || &columns < 80 
***************
*** 38,44 ****
  " Source the test script.  First grab the file name, in case the script
  " navigates away.
  let testname = expand('%')
! source %
  
  " Locate Test_ functions and execute them.
  redir @q
--- 36,50 ----
  " Source the test script.  First grab the file name, in case the script
  " navigates away.
  let testname = expand('%')
! let done = 0
! let fail = 0
! let errors = []
! try
!   source %
! catch
!   let fail += 1
!   call add(errors, 'Caught exception: ' . v:exception . ' @ ' . v:throwpoint)
! endtry
  
  " Locate Test_ functions and execute them.
  redir @q
***************
*** 46,54 ****
  redir END
  let tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g'))
  
- let done = 0
- let fail = 0
- let errors = []
  for test in tests
    if exists("*SetUp")
      call SetUp()
--- 52,57 ----
*** ../vim-7.4.980/src/version.c        2015-12-28 14:03:57.088941627 +0100
--- src/version.c       2015-12-28 14:31:47.746820045 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     981,
  /**/

-- 
Nothing is impossible for the man who doesn't have to do it.

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui