diff src/testdir/test_vim9_disassemble.vim @ 26370:a3a0885d9dd8 v8.2.3716

patch 8.2.3716: Vim9: range without a command is not compiled Commit: https://github.com/vim/vim/commit/e4eed8c6db693a9183b776032570ce2f89dcffb6 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 1 15:22:56 2021 +0000 patch 8.2.3716: Vim9: range without a command is not compiled Problem: Vim9: range without a command is not compiled. Solution: Add the ISN_EXECRANGE byte code.
author Bram Moolenaar <Bram@vim.org>
date Wed, 01 Dec 2021 16:30:04 +0100
parents f209f28ad898
children f5727e2603f0
line wrap: on
line diff
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -1999,6 +1999,25 @@ def Test_disassemble_execute()
         res)
 enddef
 
+def s:OnlyRange()
+  :$
+  :123
+  :'m
+enddef
+
+def Test_disassemble_range_only()
+  var res = execute('disass s:OnlyRange')
+  assert_match('\<SNR>\d*_OnlyRange\_s*' ..
+        ':$\_s*' ..
+        '\d EXECRANGE $\_s*' ..
+        ':123\_s*' ..
+        '\d EXECRANGE 123\_s*' ..
+        ':''m\_s*' ..
+        '\d EXECRANGE ''m\_s*' ..
+        '\d\+ RETURN void',
+        res)
+enddef
+
 def s:Echomsg()
   echomsg 'some' 'message'
   echoconsole 'nothing'