From 108eb4201f193441c19073ea2bb7780086c46385 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 13 Jul 2019 00:09:05 +0200 Subject: 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) https://github.com/vim/vim/commit/7780e5c1c5485a979ab6e3914a43e17912e213a8 --- src/nvim/testdir/test_assert.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/testdir/test_assert.vim') diff --git a/src/nvim/testdir/test_assert.vim b/src/nvim/testdir/test_assert.vim index fe87bd6ef5..a4c8ce7e43 100644 --- a/src/nvim/testdir/test_assert.vim +++ b/src/nvim/testdir/test_assert.vim @@ -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. -- cgit