Patch 8.1.2087
Problem:    Cannot easily select one test function to execute.
Solution:   Support the $TEST_FILTER environment variable. (Ozaki Kiichi,
            closes #2695)
Files:      src/Makefile, src/testdir/runtest.vim, src/testdir/summarize.vim


*** ../vim-8.1.2086/src/Makefile        2019-09-27 13:07:59.573833437 +0200
--- src/Makefile        2019-09-27 15:05:15.894014574 +0200
***************
*** 2262,2267 ****
--- 2264,2273 ----
  
  # Run individual NEW style test.
  # These do not depend on the executable, compile it when needed.
+ # Set $TEST_FILTER to select what test function to invoke, e.g.:
+ #     export TEST_FILTER=Test_terminal_wipe_buffer
+ # A partial match also works:
+ #     export TEST_FILTER=wipe_buffer
  $(NEW_TESTS):
        cd testdir; $(MAKE) $@ VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) 
SCRIPTSOURCE=../$(SCRIPTSOURCE)
  
*** ../vim-8.1.2086/src/testdir/runtest.vim     2019-09-25 21:16:11.773957877 
+0200
--- src/testdir/runtest.vim     2019-09-27 15:04:17.074458144 +0200
***************
*** 384,389 ****
--- 384,395 ----
    let s:tests = filter(s:tests, 'v:val =~ argv(1)')
  endif
  
+ " If the environment variable $TEST_FILTER is set then filter the function
+ " names against it.
+ if $TEST_FILTER != ''
+   let s:tests = filter(s:tests, 'v:val =~ $TEST_FILTER')
+ endif
+ 
  " Execute the tests in alphabetical order.
  for s:test in sort(s:tests)
    " Silence, please!
*** ../vim-8.1.2086/src/testdir/summarize.vim   2019-08-30 19:05:29.039181589 
+0200
--- src/testdir/summarize.vim   2019-09-27 15:33:00.177524758 +0200
***************
*** 8,14 ****
        let g:failed += a:match+0
      elseif a:type ==# 'skipped'
        let g:skipped += 1
!       call extend(g:skipped_output, ["\t".a:match])
      endif
    endfunc
  
--- 8,14 ----
        let g:failed += a:match+0
      elseif a:type ==# 'skipped'
        let g:skipped += 1
!       call extend(g:skipped_output, ["\t" .. a:match])
      endif
    endfunc
  
***************
*** 19,24 ****
--- 19,28 ----
    let g:failed_output = []
    let output = [""]
  
+   if $TEST_FILTER != ''
+     call extend(g:skipped_output, ["\tAll tests not matching $TEST_FILTER: '" 
.. $TEST_FILTER .. "'"])
+   endif
+ 
    try
      " This uses the :s command to just fetch and process the output of the
      " tests, it doesn't actually replace anything.
*** ../vim-8.1.2086/src/version.c       2019-09-27 14:19:05.600200451 +0200
--- src/version.c       2019-09-27 15:06:18.773561966 +0200
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     2087,
  /**/

-- 
ARTHUR:  Well, I can't just call you `Man'.
DENNIS:  Well, you could say `Dennis'.
ARTHUR:  Well, I didn't know you were called `Dennis.'
DENNIS:  Well, you didn't bother to find out, did you?
                                  The Quest for the Holy Grail (Monty Python)

 /// 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/201909271334.x8RDYeqJ014524%40masaka.moolenaar.net.

Raspunde prin e-mail lui