diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-23 14:26:03 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-23 14:26:20 -0400 |
commit | d1e7156f26d4f9f2160deb02f75728d9245402b8 (patch) | |
tree | dc363a38479bb14ff492837a96b3c6ccf497b93d /src | |
parent | 9961e9bcb748c68f62cd9f6f11a2361d9318f793 (diff) | |
download | rneovim-d1e7156f26d4f9f2160deb02f75728d9245402b8.tar.gz rneovim-d1e7156f26d4f9f2160deb02f75728d9245402b8.tar.bz2 rneovim-d1e7156f26d4f9f2160deb02f75728d9245402b8.zip |
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.
https://github.com/vim/vim/commit/7b666c7883c905a0e1428b8bfa7ba062af2656e7
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/runtest.vim | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 9ffa02827f..8b5270baa9 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -246,11 +246,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 @@ -339,8 +346,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. |