changeset 23950:4279c1c66df1 v8.2.2517

patch 8.2.2517: Vim9: fix for s390 not tested on other systems Commit: https://github.com/vim/vim/commit/7c5b3c03699a4ab31f47c24290852d441ea8c12a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 14 22:40:57 2021 +0100 patch 8.2.2517: Vim9: fix for s390 not tested on other systems Problem: Vim9: fix for s390 not tested on other systems. Solution: Add a test.
author Bram Moolenaar <Bram@vim.org>
date Sun, 14 Feb 2021 22:45:03 +0100
parents 151224bd41f7
children c58a5a123ca5
files src/testdir/test_vim9_script.vim src/version.c
diffstat 2 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -724,6 +724,27 @@ def Test_try_catch_fails()
   CheckDefFailure(['throw xxx'], 'E1001:')
 enddef
 
+def Try_catch_skipped()
+  var l = []
+  try
+  finally
+  endtry
+
+  if 1
+  else
+    try
+    endtry
+  endif
+enddef
+
+" The skipped try/endtry was updating the wrong instruction.
+def Test_try_catch_skipped()
+  var instr = execute('disassemble Try_catch_skipped')
+  assert_match("NEWLIST size 0\n", instr)
+enddef
+
+
+
 def Test_throw_vimscript()
   # only checks line continuation
   var lines =<< trim END
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2517,
+/**/
     2516,
 /**/
     2515,