mirror of
https://github.com/neovim/neovim.git
synced 2026-02-05 20:11:46 +10:00
Problem: Assert_fails() does not fail inside try/catch.
Solution: Set trylevel to zero. (Ozaki Kiichi, closes vim/vim#4639)
7780e5c1c5
14 lines
300 B
VimL
14 lines
300 B
VimL
" 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.
|
|
quit
|
|
endfunc
|