]> granicus.if.org Git - vim/commitdiff
patch 8.2.2997: Vim9: disassemble test fails v8.2.2997
authorBram Moolenaar <Bram@vim.org>
Mon, 14 Jun 2021 19:08:56 +0000 (21:08 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 14 Jun 2021 19:08:56 +0000 (21:08 +0200)
Problem:    Vim9: disassemble test fails.
Solution:   Adjust expected output.

src/testdir/test_vim9_disassemble.vim
src/version.c

index e1ed6754db225e6fae0d6280e4c71af95c77160f..f09cb1ddda8d9cf8085393345c4707816c93d28b 100644 (file)
@@ -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)
index 29018a8f79518337f06d5ed3d9a4c9aaa48f9305..ee3db22710880c1ba4eda5a71553555bb66ffe42 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2997,
 /**/
     2996,
 /**/