patch 8.2.0224: compiling :elseif not tested yet

Problem:    compiling :elseif not tested yet.
Solution:   Add test for :elseif.  Fix generating jumps.
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index 3345758..b011342 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -216,5 +216,67 @@
         \, res)
 enddef
 
+def HasEval()
+  if has("eval")
+    echo "yes"
+  else
+    echo "no"
+  endif
+enddef
+
+def HasNothing()
+  if has("nothing")
+    echo "yes"
+  else
+    echo "no"
+  endif
+enddef
+
+def HasSomething()
+  if has("nothing")
+    echo "nothing"
+  elseif has("something")
+    echo "something"
+  elseif has("eval")
+    echo "eval"
+  elseif has("less")
+    echo "less"
+  endif
+enddef
+
+def Test_compile_const_expr()
+  assert_equal("\nyes", execute('call HasEval()'))
+  let instr = execute('disassemble HasEval')
+  assert_match('HasEval.*'
+        \ .. 'if has("eval").*'
+        \ .. ' PUSHS "yes".*'
+        \, instr)
+  assert_notmatch('JUMP', instr)
+
+  assert_equal("\nno", execute('call HasNothing()'))
+  instr = execute('disassemble HasNothing')
+  assert_match('HasNothing.*'
+        \ .. 'if has("nothing").*'
+        \ .. 'else.*'
+        \ .. ' PUSHS "no".*'
+        \, instr)
+  assert_notmatch('PUSHS "yes"', instr)
+  assert_notmatch('JUMP', instr)
+
+  assert_equal("\neval", execute('call HasSomething()'))
+  instr = execute('disassemble HasSomething')
+  assert_match('HasSomething.*'
+        \ .. 'if has("nothing").*'
+        \ .. 'elseif has("something").*'
+        \ .. 'elseif has("eval").*'
+        \ .. ' PUSHS "eval".*'
+        \ .. 'elseif has("less").*'
+        \, instr)
+  assert_notmatch('PUSHS "nothing"', instr)
+  assert_notmatch('PUSHS "something"', instr)
+  assert_notmatch('PUSHS "less"', instr)
+  assert_notmatch('JUMP', instr)
+enddef
+
 
 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index 4b57bde..892806f 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -459,34 +459,22 @@
 EOF
 endfunc
 
-def HasEval()
-  if has('eval')
-    echo 'yes'
+def IfElse(what: number): string
+  let res = ''
+  if what == 1
+    res = "one"
+  elseif what == 2
+    res = "two"
   else
-    echo 'no'
+    res = "three"
   endif
+  return res
 enddef
 
-def HasNothing()
-  if has('nothing')
-    echo 'yes'
-  else
-    echo 'no'
-  endif
-enddef
-
-def Test_compile_const_expr()
-  assert_equal("\nyes", execute('call HasEval()'))
-  let instr = execute('disassemble HasEval')
-  assert_match('PUSHS "yes"', instr)
-  assert_notmatch('PUSHS "no"', instr)
-  assert_notmatch('JUMP', instr)
-
-  assert_equal("\nno", execute('call HasNothing()'))
-  instr = execute('disassemble HasNothing')
-  assert_notmatch('PUSHS "yes"', instr)
-  assert_match('PUSHS "no"', instr)
-  assert_notmatch('JUMP', instr)
+def Test_if_elseif_else()
+  assert_equal('one', IfElse(1))
+  assert_equal('two', IfElse(2))
+  assert_equal('three', IfElse(3))
 enddef