Hirohito Higashi wrote:

> Hi Bram and List,
> 
> How to reproduce:
> - To duplicate Test_assert_false() in vim/src/testdir/test_assert.vim
>   $ cd vim/src
>   $ vim testdir/test_assert.vim
> 
> edit like below;
> " Test that the methods used for testing work.
> 
> func Test_assert_false()
>   call assert_false(0)
> endfunc
> 
> func Test_assert_false()
>   call assert_false(0)
> endfunc
> 
> func Test_assert_true()
> snip...
> 
> - run test_assert
>   $ make test_assert
> cd testdir; rm -f test_assert.res; make -f Makefile test_assert.res 
> VIMPROG=../vim  SCRIPTSOURCE=../../runtime
> make[1]: Entering directory '/home/h_east/xxx/github/vim/src/testdir'
> VIMRUNTIME=../../runtime; export VIMRUNTIME;  ../vim -f -u unix.vim -U NONE 
> --noplugin -u runtest.vim test_assert.vim
> Error detected while processing 
> /home/h_east/xxx/github/vim/src/testdir/test_assert.vim:
> line    9:
> E122: Function Test_assert_false already exists, add ! to replace it
> function Test_assert_equal()
> function Test_assert_false()
> function Test_assert_true()
> "test_assert.res" [New File]
> "test_assert.res" "test_assert.res" [New File] 0 lines, 0 characters written
> Executed 3 tests
> make[1]: Leaving directory '/home/h_east/xxx/github/vim/src/testdir'
> 
> 
> What happen:
> - E122 occurred. but that error message does not write test.log and does not 
> display the result such as '1 FAILED'.
> 
> I think:
> We should write script error message to the test.log, and display the last 
> result '1 FAILED'. 
> It would be useless to do so.
> When number of test items is large, We will miss the error.
> 
> 
> I wrote a patch.
> Please check this.

Thanks.  In the old way of testing there could be errors which are
ignored.  I suppose in these new tests any error could be considered a
failure.  A try/catch can be used for expected errors.

-- 
Proverb: A nightingale that forgets the lyrics is a hummingbird.

 /// 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