diff src/testdir/runtest.vim @ 18184:ef35a3a70c24 v8.1.2087

patch 8.1.2087: cannot easily select one test function to execute Commit: https://github.com/vim/vim/commit/a7f6c3cf071bb6267e0bd2eb3d27ca240381ba87 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 27 15:34:16 2019 +0200 patch 8.1.2087: cannot easily select one test function to execute Problem: Cannot easily select one test function to execute. Solution: Support the $TEST_FILTER environment variable. (Ozaki Kiichi, closes #2695)
author Bram Moolenaar <Bram@vim.org>
date Fri, 27 Sep 2019 16:00:45 +0200
parents ea327d003580
children b5bf891fa92c
line wrap: on
line diff
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -384,6 +384,12 @@ if argc() > 1
   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!