]> granicus.if.org Git - vim/commitdiff
patch 8.2.2517: Vim9: fix for s390 not tested on other systems v8.2.2517
authorBram Moolenaar <Bram@vim.org>
Sun, 14 Feb 2021 21:40:57 +0000 (22:40 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 14 Feb 2021 21:40:57 +0000 (22:40 +0100)
Problem:    Vim9: fix for s390 not tested on other systems.
Solution:   Add a test.

src/testdir/test_vim9_script.vim
src/version.c

index 996c357c52d29714e7a8320acad6b4caeeea3f5a..0becc7d1ba838890f1b6ec07cc27d6080942f64b 100644 (file)
@@ -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
index c3b73a58afedc664d9ec5d9d2b90440376a47f5c..60d7d62dc44948d99445ca5eec98e5718edffbd5 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2517,
 /**/
     2516,
 /**/