diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-10-09 02:20:07 +0100 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-13 21:27:38 +0800 |
commit | 789558d365a3134a33cdf4f1f3cc5e77efcad687 (patch) | |
tree | 31981e0c3737e04a129b9dc79b3f08759df3aa13 /src | |
parent | 5feb8cdbb4d1ac01288058112702279c476f5aea (diff) | |
download | rneovim-789558d365a3134a33cdf4f1f3cc5e77efcad687.tar.gz rneovim-789558d365a3134a33cdf4f1f3cc5e77efcad687.tar.bz2 rneovim-789558d365a3134a33cdf4f1f3cc5e77efcad687.zip |
vim-patch:8.2.3480: test does not fail without the fix for a crash
Problem: Test does not fail without the fix for a crash.
Solution: Write the bad code in a file and source it. (Dominique Pellé,
closes vim/vim#8961)
https://github.com/vim/vim/commit/949de97da32d4fff28c569387e2ba8b3e311e64d
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_trycatch.vim | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/nvim/testdir/test_trycatch.vim b/src/nvim/testdir/test_trycatch.vim index f625f52906..34c402fc73 100644 --- a/src/nvim/testdir/test_trycatch.vim +++ b/src/nvim/testdir/test_trycatch.vim @@ -2046,17 +2046,26 @@ func Test_user_command_function_call_with_endtry() endfunc func ThisWillFail() - try - if x | endif - catch - for l in [] - finally + endfunc +" This was crashing prior to the fix in 8.2.3478. func Test_error_in_catch_and_finally() - call assert_fails('call ThisWillFail()', ['E121:', 'E600:']) -endfunc + let lines =<< trim END + try + echo x + catch + for l in [] + finally + END + call writefile(lines, 'XtestCatchAndFinally') + try + source XtestCatchAndFinally + catch /E600:/ + endtry + call delete('XtestCatchAndFinally') +endfunc " Modeline {{{1 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker |