vim-patch:8.1.1660: assert_fails() inside try/catch #10472

Problem:    Assert_fails() does not fail inside try/catch.
Solution:   Set trylevel to zero. (Ozaki Kiichi, closes vim/vim#4639)
7780e5c1c5
This commit is contained in:
Daniel Hahler
2019-07-13 00:09:05 +02:00
committed by Justin M. Keyes
parent e682d799fa
commit 108eb4201f
2 changed files with 11 additions and 0 deletions

View File

@@ -1,5 +1,11 @@
" Test that the methods used for testing work.
func Test_assert_fails_in_try_block()
try
call assert_equal(0, assert_fails('throw "error"'))
endtry
endfunc
" Must be last.
func Test_zz_quit_detected()
" Verify that if a test function ends Vim the test script detects this.