diff options
Diffstat (limited to 'src/nvim/testdir/summarize.vim')
-rw-r--r-- | src/nvim/testdir/summarize.vim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/testdir/summarize.vim b/src/nvim/testdir/summarize.vim index 5bbf0b338a..7f8f758a71 100644 --- a/src/nvim/testdir/summarize.vim +++ b/src/nvim/testdir/summarize.vim @@ -1,6 +1,7 @@ if 1 " This is executed only with the eval feature set nocompatible + set viminfo= func Count(match, type) if a:type ==# 'executed' let g:executed += (a:match+0) @@ -8,7 +9,7 @@ if 1 let g:failed += a:match+0 elseif a:type ==# 'skipped' let g:skipped += 1 - call extend(g:skipped_output, ["\t".a:match]) + call extend(g:skipped_output, ["\t" .. a:match]) endif endfunc @@ -19,11 +20,15 @@ if 1 let g:failed_output = [] let output = [""] + if $TEST_FILTER != '' + call extend(g:skipped_output, ["\tAll tests not matching $TEST_FILTER: '" .. $TEST_FILTER .. "'"]) + endif + try " This uses the :s command to just fetch and process the output of the " tests, it doesn't actually replace anything. " And it uses "silent" to avoid reporting the number of matches. - silent %s/^Executed\s\+\zs\d\+\ze\s\+tests\?/\=Count(submatch(0),'executed')/egn + silent %s/Executed\s\+\zs\d\+\ze\s\+tests\?/\=Count(submatch(0),'executed')/egn silent %s/^SKIPPED \zs.*/\=Count(submatch(0), 'skipped')/egn silent %s/^\(\d\+\)\s\+FAILED:/\=Count(submatch(1), 'failed')/egn |