mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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)
949de97da3
This commit is contained in:
parent
5feb8cdbb4
commit
789558d365
@ -2046,17 +2046,26 @@ func Test_user_command_function_call_with_endtry()
|
||||
endfunc
|
||||
|
||||
func ThisWillFail()
|
||||
|
||||
endfunc
|
||||
|
||||
" This was crashing prior to the fix in 8.2.3478.
|
||||
func Test_error_in_catch_and_finally()
|
||||
let lines =<< trim END
|
||||
try
|
||||
if x | endif
|
||||
echo x
|
||||
catch
|
||||
for l in []
|
||||
finally
|
||||
endfunc
|
||||
END
|
||||
call writefile(lines, 'XtestCatchAndFinally')
|
||||
try
|
||||
source XtestCatchAndFinally
|
||||
catch /E600:/
|
||||
endtry
|
||||
|
||||
func Test_error_in_catch_and_finally()
|
||||
call assert_fails('call ThisWillFail()', ['E121:', 'E600:'])
|
||||
call delete('XtestCatchAndFinally')
|
||||
endfunc
|
||||
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
|
||||
|
Loading…
Reference in New Issue
Block a user