Mercurial > vim
changeset 25893:51694ef3902e v8.2.3480
patch 8.2.3480: test does not fail without the fix for a crash
Commit: https://github.com/vim/vim/commit/949de97da32d4fff28c569387e2ba8b3e311e64d
Author: Dominique Pelle <dominique.pelle@gmail.com>
Date: Tue Oct 5 19:28:01 2021 +0100
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 #8961)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 05 Oct 2021 20:30:05 +0200 |
parents | 868ffaf8fe13 |
children | 389560a21382 |
files | src/testdir/test_trycatch.vim src/version.c |
diffstat | 2 files changed, 18 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_trycatch.vim +++ b/src/testdir/test_trycatch.vim @@ -2274,17 +2274,26 @@ func Test_user_command_function_call_wit 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:']) + 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