changeset 24920:6235e5d3523d v8.2.2997

patch 8.2.2997: Vim9: disassemble test fails Commit: https://github.com/vim/vim/commit/26d711645c12abb29bcaf410b4f02d700f62e799 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 14 21:08:56 2021 +0200 patch 8.2.2997: Vim9: disassemble test fails Problem: Vim9: disassemble test fails. Solution: Adjust expected output.
author Bram Moolenaar <Bram@vim.org>
date Mon, 14 Jun 2021 21:15:04 +0200
parents 6349b9bc8db5
children a08e12346f59
files src/testdir/test_vim9_disassemble.vim src/version.c
diffstat 2 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -2146,6 +2146,7 @@ enddef
 
 def s:Profiled(): string
   echo "profiled"
+  var some = "some text"
   return "done"
 enddef
 
@@ -2159,12 +2160,17 @@ def Test_profiled()
         '\d PROFILE START line 1\_s*' ..
         '\d PUSHS "profiled"\_s*' ..
         '\d ECHO 1\_s*' ..
-        'return "done"\_s*' ..
+        'var some = "some text"\_s*' ..
         '\d PROFILE END\_s*' ..
         '\d PROFILE START line 2\_s*' ..
+        '\d PUSHS "some text"\_s*' ..
+        '\d STORE $0\_s*' ..
+        'return "done"\_s*' ..
+        '\d PROFILE END\_s*' ..
+        '\d PROFILE START line 3\_s*' ..
         '\d PUSHS "done"\_s*' ..
-        '\d RETURN\_s*' ..
-        '\d PROFILE END',
+        '\d\+ RETURN\_s*' ..
+        '\d\+ PROFILE END',
         res)
 enddef
 
@@ -2172,11 +2178,15 @@ def Test_debugged()
   var res = execute('disass debug s:Profiled')
   assert_match('<SNR>\d*_Profiled\_s*' ..
         'echo "profiled"\_s*' ..
-        '\d DEBUG line 1\_s*' ..
+        '\d DEBUG line 1 varcount 0\_s*' ..
         '\d PUSHS "profiled"\_s*' ..
         '\d ECHO 1\_s*' ..
+        'var some = "some text"\_s*' ..
+        '\d DEBUG line 2 varcount 0\_s*' ..
+        '\d PUSHS "some text"\_s*' ..
+        '\d STORE $0\_s*' ..
         'return "done"\_s*' ..
-        '\d DEBUG line 2\_s*' ..
+        '\d DEBUG line 3 varcount 1\_s*' ..
         '\d PUSHS "done"\_s*' ..
         '\d RETURN\_s*',
         res)
--- 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 */
 /**/
+    2997,
+/**/
     2996,
 /**/
     2995,