diff src/testdir/test_vim9_cmd.vim @ 22260:d7c1e3efa88e v8.2.1679

patch 8.2.1679: Vim9: ":*" is not recognized as a range Commit: https://github.com/vim/vim/commit/3bd8de40b484d3617a19092d3cc036f8b4f3d51c Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 14 16:37:34 2020 +0200 patch 8.2.1679: Vim9: ":*" is not recognized as a range Problem: Vim9: ":*" is not recognized as a range. Solution: Move recognizing "*" into skip_range(). (closes https://github.com/vim/vim/issues/6838)
author Bram Moolenaar <Bram@vim.org>
date Mon, 14 Sep 2020 16:45:04 +0200
parents 6941d3205be9
children 4c488004edbc
line wrap: on
line diff
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -330,6 +330,17 @@ def Test_put_command()
   bwipe!
 enddef
 
+def Test_command_star_range()
+  new
+  setline(1, ['xxx foo xxx', 'xxx bar xxx', 'xxx foo xx bar'])
+  setpos("'<", [0, 1, 0, 0])
+  setpos("'>", [0, 3, 0, 0])
+  :*s/\(foo\|bar\)/baz/g
+  getline(1, 3)->assert_equal(['xxx baz xxx', 'xxx baz xxx', 'xxx baz xx baz'])
+
+  bwipe!
+enddef
+
 
 
 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker