summaryrefslogtreecommitdiff
path: root/src/testdir/test_cmdline.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-18 21:14:30 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-18 21:14:30 +0200
commitc8cb883015619cfe6db931ac2d6e15b0be5c56ed (patch)
treeb7c77228020edb2d8fb95fc9f14d6118e611e468 /src/testdir/test_cmdline.vim
parentefd885559405e1561d577e1b0e6fa827705d285e (diff)
downloadvim-git-c8cb883015619cfe6db931ac2d6e15b0be5c56ed.tar.gz
patch 8.2.1007: completion doesn't work after ":r ++arg !"v8.2.1007
Problem: Completion doesn't work after ":r ++arg !". Solution: Skip over "++arg". (Christian Brabandt, closes #6275, closes #6258)
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r--src/testdir/test_cmdline.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index eeb9c2f54..5d772eacd 100644
--- 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