diff src/testdir/test_cmdline.vim @ 20911:b4835adf384e v8.2.1007

patch 8.2.1007: completion doesn't work after ":r ++arg !" Commit: https://github.com/vim/vim/commit/c8cb883015619cfe6db931ac2d6e15b0be5c56ed Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 18 21:14:30 2020 +0200 patch 8.2.1007: completion doesn't work after ":r ++arg !" Problem: Completion doesn't work after ":r ++arg !". Solution: Skip over "++arg". (Christian Brabandt, closes https://github.com/vim/vim/issues/6275, closes #6258)
author Bram Moolenaar <Bram@vim.org>
date Thu, 18 Jun 2020 21:15:03 +0200
parents 69055d27e85e
children 55b3849ded11
line wrap: on
line diff
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -1568,5 +1568,20 @@ func Test_zero_line_search()
   q!
 endfunc
 
+func Test_read_shellcmd()
+  CheckUnix
+  if executable('ls')
+    " There should be ls in the $PATH
+    call feedkeys(":r! l\<c-a>\<c-b>\"\<cr>", 'tx')
+    call assert_match('^"r! .*\<ls\>', @:)
+  endif
+
+  if executable('rm')
+    call feedkeys(":r! ++enc=utf-8 r\<c-a>\<c-b>\"\<cr>", 'tx')
+    call assert_notmatch('^"r!.*\<runtest.vim\>', @:)
+    call assert_match('^"r!.*\<rm\>', @:)
+  endif
+endfunc
+
 
 " vim: shiftwidth=2 sts=2 expandtab