summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Pelle <dominique.pelle@gmail.com>2021-10-05 19:28:01 +0100
committerBram Moolenaar <Bram@vim.org>2021-10-05 19:28:01 +0100
commit949de97da32d4fff28c569387e2ba8b3e311e64d (patch)
tree4c0ab6ce76dc9b52b04b089386d4abeff70917f7
parent7c25a7c0a129300d0632e5b99ccefdca9bf3ffa2 (diff)
downloadvim-git-8.2.3480.tar.gz
patch 8.2.3480: test does not fail without the fix for a crashv8.2.3480
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)
-rw-r--r--src/testdir/test_trycatch.vim23
-rw-r--r--src/version.c2
2 files changed, 18 insertions, 7 deletions
diff --git a/src/testdir/test_trycatch.vim b/src/testdir/test_trycatch.vim
index ac12671da..4b8f7efbd 100644
--- a/src/testdir/test_trycatch.vim
+++ b/src/testdir/test_trycatch.vim
@@ -2274,17 +2274,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
diff --git a/src/version.c b/src/version.c
index 96e760605..70f363a42 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3480,
+/**/
3479,
/**/
3478,