summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-27 21:25:00 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-27 21:25:00 +0200
commit7b666c7883c905a0e1428b8bfa7ba062af2656e7 (patch)
tree048bf83099bf298c6dc564e95fee50bef159bb1b
parent383f387d9d3a114cdfa2af61167beb802d8ece64 (diff)
downloadvim-git-7b666c7883c905a0e1428b8bfa7ba062af2656e7.tar.gz
patch 8.1.2089: do not get a hint that $TEST_FILTER was activev8.1.2089
Problem: Do not get a hint that $TEST_FILTER was active. Solution: Mention $TEST_FILTER if no functions were executed.
-rw-r--r--src/testdir/runtest.vim14
-rw-r--r--src/version.c2
2 files changed, 14 insertions, 2 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index dd717450e..e1ea7f1e6 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -253,11 +253,18 @@ func FinishTesting()
endif
if s:done == 0
- let message = 'NO tests executed'
+ if s:filtered > 0
+ let message = "NO tests match $TEST_FILTER: '" .. $TEST_FILTER .. "'"
+ else
+ let message = 'NO tests executed'
+ endif
else
+ if s:filtered > 0
+ call add(s:messages, "Filtered " .. s:filtered .. " tests with $TEST_FILTER")
+ endif
let message = 'Executed ' . s:done . (s:done > 1 ? ' tests' : ' test')
endif
- if has('reltime')
+ if s:done > 0 && has('reltime')
let message ..= ' in ' .. reltimestr(reltime(s:start_time)) .. ' seconds'
endif
echo message
@@ -386,8 +393,11 @@ endif
" If the environment variable $TEST_FILTER is set then filter the function
" names against it.
+let s:filtered = 0
if $TEST_FILTER != ''
+ let s:filtered = len(s:tests)
let s:tests = filter(s:tests, 'v:val =~ $TEST_FILTER')
+ let s:filtered -= len(s:tests)
endif
" Execute the tests in alphabetical order.
diff --git a/src/version.c b/src/version.c
index 35253eb43..552f82a70 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2089,
+/**/
2088,
/**/
2087,