summaryrefslogtreecommitdiffstats
path: root/src/testdir/runtest.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-27 15:34:16 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-27 15:34:16 +0200
commita7f6c3cf071bb6267e0bd2eb3d27ca240381ba87 (patch)
treec0605ca553ec25907e3a6ddca6f5de1e425ef312 /src/testdir/runtest.vim
parent38f1eeac3d8ec0a0e275213a62ba7ff1afb8ab33 (diff)
patch 8.1.2087: cannot easily select one test function to executev8.1.2087
Problem: Cannot easily select one test function to execute. Solution: Support the $TEST_FILTER environment variable. (Ozaki Kiichi, closes #2695)
Diffstat (limited to 'src/testdir/runtest.vim')
-rw-r--r--src/testdir/runtest.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 0d53a754ab..dd717450e4 100644
--- 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!