Mercurial > vim
diff src/testdir/runtest.vim @ 7372:6b057079a836 v7.4.991
commit https://github.com/vim/vim/commit/096c8bb40d51b22a4b1d761baf7bb79fb9e55a28
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 29 14:26:57 2015 +0100
patch 7.4.991
Problem: When running new style tests the output is not visible.
Solution: Add the testdir/messages file and show it. Update the list of
test names.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 29 Dec 2015 14:30:04 +0100 |
parents | ddab7ae8796d |
children | 4761fed349ed |
line wrap: on
line diff
--- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -39,6 +39,7 @@ let testname = expand('%') let done = 0 let fail = 0 let errors = [] +let messages = [] try source % catch @@ -57,6 +58,7 @@ for test in tests call SetUp() endif + call add(messages, 'Executing ' . test) let done += 1 try exe 'call ' . test @@ -92,9 +94,20 @@ if len(errors) > 0 write endif -echo 'Executed ' . done . (done > 1 ? ' tests': ' test') +let message = 'Executed ' . done . (done > 1 ? ' tests': ' test') +echo message +call add(messages, message) if fail > 0 - echo fail . ' FAILED' + let message = fail . ' FAILED' + echo message + call add(messages, message) endif +" Append messages to "messages" +split messages +call append(line('$'), '') +call append(line('$'), 'From ' . testname . ':') +call append(line('$'), messages) +write + qall!