forked from aniani/vim
patch 8.1.2089: do not get a hint that $TEST_FILTER was active
Problem: Do not get a hint that $TEST_FILTER was active. Solution: Mention $TEST_FILTER if no functions were executed.
This commit is contained in:
@@ -253,11 +253,18 @@ func FinishTesting()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if s:done == 0
|
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
|
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')
|
let message = 'Executed ' . s:done . (s:done > 1 ? ' tests' : ' test')
|
||||||
endif
|
endif
|
||||||
if has('reltime')
|
if s:done > 0 && has('reltime')
|
||||||
let message ..= ' in ' .. reltimestr(reltime(s:start_time)) .. ' seconds'
|
let message ..= ' in ' .. reltimestr(reltime(s:start_time)) .. ' seconds'
|
||||||
endif
|
endif
|
||||||
echo message
|
echo message
|
||||||
@@ -386,8 +393,11 @@ endif
|
|||||||
|
|
||||||
" If the environment variable $TEST_FILTER is set then filter the function
|
" If the environment variable $TEST_FILTER is set then filter the function
|
||||||
" names against it.
|
" names against it.
|
||||||
|
let s:filtered = 0
|
||||||
if $TEST_FILTER != ''
|
if $TEST_FILTER != ''
|
||||||
|
let s:filtered = len(s:tests)
|
||||||
let s:tests = filter(s:tests, 'v:val =~ $TEST_FILTER')
|
let s:tests = filter(s:tests, 'v:val =~ $TEST_FILTER')
|
||||||
|
let s:filtered -= len(s:tests)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Execute the tests in alphabetical order.
|
" Execute the tests in alphabetical order.
|
||||||
|
|||||||
@@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2089,
|
||||||
/**/
|
/**/
|
||||||
2088,
|
2088,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user