0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

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)
This commit is contained in:
Dominique Pelle
2021-10-05 19:28:01 +01:00
committed by Bram Moolenaar
parent 7c25a7c0a1
commit 949de97da3
2 changed files with 18 additions and 7 deletions

View File

@@ -2274,17 +2274,26 @@ func Test_user_command_function_call_with_endtry()
endfunc endfunc
func ThisWillFail() func ThisWillFail()
try
if x | endif
catch
for l in []
finally
endfunc endfunc
" This was crashing prior to the fix in 8.2.3478.
func Test_error_in_catch_and_finally() func Test_error_in_catch_and_finally()
call assert_fails('call ThisWillFail()', ['E121:', 'E600:']) let lines =<< trim END
endfunc 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 " Modeline {{{1
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker

View File

@@ -757,6 +757,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
3480,
/**/ /**/
3479, 3479,
/**/ /**/