Hirohito Higashi wrote:

> Hi Bram and list,
> 
> It is hard to notice even if an error occurs in SetUp() or TearDown() when 
> making a make test
> 
> How to reproduce:
> - Explicitly put errors into SetUp() in vim/src/testdir/test_hide.vim.
> function SetUp()
>   aaaaaaaaaa        " <--------------------------------- Add this line.
>   let s:save_hidden = &hidden
>   let s:save_bufhidden = &bufhidden
>   let s:save_autowrite = &autowrite
>   set nohidden
>   set bufhidden=
>   set noautowrite
> endfunc
> 
> - Run make test at vim/src directory.
>   $ make test
> 
> Expected behavior:
> - An error is displayed in the test result in an easy-to-understand manner.
> 
> Actual behavior:
> - make test error in SetUp() and TearDown() is hard to understand.
> - An error is displayed for a moment, and no error is displayed in the test 
> result.
> 
> 
> I wrote a patch.  (Attached)
> 
> After patched `make test` result:
> --------8<--------
> >From test_hide.vim:
> Executing Test_hide()
> Executed 1 test
> 1 FAILED:
> Found errors in Test_hide():
> Caught exception in SetUp() before Test_hide(): Vim:E492: Not an editor 
> command:   aaaaaaaaaa @ function RunTheTest[4]..SetUp, line 1
> Caught exception in TearDown() after Test_hide(): Vim(let):E121: Undefined 
> variable: s:save_hidden @ function RunTheTest[23]..TearDown, line 1
> --------8<--------
> 
> Check and include it please.

Good idea, thanks.

-- 
This planet has -- or rather had -- a problem, which was this: most
of the people living on it were unhappy for pretty much of the time.
Many solutions were suggested for this problem, but most of these
were largely concerned with the movements of small green pieces of
paper, which is odd because on the whole it wasn't the small green
pieces of paper that were unhappy.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui