Patch 8.1.1893
Problem:    Script to summarize test results can be improved.
Solution:   Use "silent" for substitute to avoid reporting number of matches.
            Remove duplicate "set nocp". (Daniel Hahler, closes #4845)
Files:      src/testdir/summarize.vim


*** ../vim-8.1.1892/src/testdir/summarize.vim   2019-06-07 21:29:44.500007647 
+0200
--- src/testdir/summarize.vim   2019-08-20 21:24:59.045644422 +0200
***************
*** 1,7 ****
- set nocp
  if 1
!   " This is executed with the eval feature
!   set nocp
    func Count(match, type)
      if a:type ==# 'executed'
        let g:executed += (a:match+0)
--- 1,6 ----
  if 1
!   " This is executed only with the eval feature
!   set nocompatible
    func Count(match, type)
      if a:type ==# 'executed'
        let g:executed += (a:match+0)
***************
*** 22,31 ****
  
    try
      " This uses the :s command to just fetch and process the output of the
!     " tests, it doesn't acutally replay anything
!     %s/^Executed\s\+\zs\d\+\ze\s\+tests/\=Count(submatch(0),'executed')/egn
!     %s/^SKIPPED \zs.*/\=Count(submatch(0), 'skipped')/egn
!     %s/^\(\d\+\)\s\+FAILED:/\=Count(submatch(1), 'failed')/egn
  
      call extend(output, ["Skipped:"]) 
      call extend(output, skipped_output)
--- 21,31 ----
  
    try
      " This uses the :s command to just fetch and process the output of the
!     " tests, it doesn't acutally replace anything.
!     " And it uses "silent" to avoid reporting the number of matches.
!     silent 
%s/^Executed\s\+\zs\d\+\ze\s\+tests/\=Count(submatch(0),'executed')/egn
!     silent %s/^SKIPPED \zs.*/\=Count(submatch(0), 'skipped')/egn
!     silent %s/^\(\d\+\)\s\+FAILED:/\=Count(submatch(1), 'failed')/egn
  
      call extend(output, ["Skipped:"]) 
      call extend(output, skipped_output)
***************
*** 37,43 ****
            \ printf(" Skipped: %5d Tests", g:skipped),
            \ printf("  %s: %5d Tests", g:failed == 0 ? 'Failed' : 'FAILED', 
g:failed),
            \ "",
!           \ ]) 
      if filereadable('test.log')
        " outputs and indents the failed test result
        call extend(output, ["", "Failures: "])
--- 37,43 ----
            \ printf(" Skipped: %5d Tests", g:skipped),
            \ printf("  %s: %5d Tests", g:failed == 0 ? 'Failed' : 'FAILED', 
g:failed),
            \ "",
!           \ ])
      if filereadable('test.log')
        " outputs and indents the failed test result
        call extend(output, ["", "Failures: "])
*** ../vim-8.1.1892/src/version.c       2019-08-20 21:11:43.180949125 +0200
--- src/version.c       2019-08-20 21:22:44.986677574 +0200
***************
*** 767,768 ****
--- 767,770 ----
  {   /* Add new patch number below this line */
+ /**/
+     1893,
  /**/

-- 
>From "know your smileys":
 =):-)  Uncle Sam

 /// 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/201908201926.x7KJQFnO010707%40masaka.moolenaar.net.

Raspunde prin e-mail lui