To: vim_dev@googlegroups.com Subject: Patch 8.0.0088 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0088 Problem: When a test fails in Setup or Teardown the problem is not reported. Solution: Add a try/catch. (Hirohito Higashi) Files: src/testdir/runtest.vim *** ../vim-8.0.0087/src/testdir/runtest.vim 2016-09-25 22:27:33.709341985 +0200 --- src/testdir/runtest.vim 2016-11-17 17:33:55.192759713 +0100 *************** *** 89,95 **** function RunTheTest(test) echo 'Executing ' . a:test if exists("*SetUp") ! call SetUp() endif call add(s:messages, 'Executing ' . a:test) --- 89,99 ---- function RunTheTest(test) echo 'Executing ' . a:test if exists("*SetUp") ! try ! call SetUp() ! catch ! call add(v:errors, 'Caught exception in SetUp() before ' . a:test . ': ' . v:exception . ' @ ' . v:throwpoint) ! endtry endif call add(s:messages, 'Executing ' . a:test) *************** *** 104,110 **** endtry if exists("*TearDown") ! call TearDown() endif " Close any extra windows and make the current one not modified. --- 108,118 ---- endtry if exists("*TearDown") ! try ! call TearDown() ! catch ! call add(v:errors, 'Caught exception in TearDown() after ' . a:test . ': ' . v:exception . ' @ ' . v:throwpoint) ! endtry endif " Close any extra windows and make the current one not modified. *************** *** 221,223 **** --- 229,233 ---- write qall! + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.0.0087/src/version.c 2016-11-17 17:25:28.212093109 +0100 --- src/version.c 2016-11-17 17:34:43.256423233 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 88, /**/ -- Time is an illusion. Lunchtime doubly so. -- Ford Prefect, in Douglas Adams' "The Hitchhiker's Guide to the Galaxy" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///