aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_cmdline.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_cmdline.vim')
-rw-r--r--src/nvim/testdir/test_cmdline.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index 81f653c393..8fc3361b79 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -548,6 +548,13 @@ func Test_cmdline_complete_user_names()
endif
endfunc
+func Test_cmdline_complete_bang()
+ if executable('whoami')
+ call feedkeys(":!whoam\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_match('^".*\<whoami\>', @:)
+ endif
+endfunc
+
funct Test_cmdline_complete_languages()
let lang = substitute(execute('language messages'), '.*"\(.*\)"$', '\1', '')
@@ -570,6 +577,17 @@ funct Test_cmdline_complete_languages()
endif
endfunc
+func Test_cmdline_complete_expression()
+ let g:SomeVar = 'blah'
+ for cmd in ['exe', 'echo', 'echon', 'echomsg']
+ call feedkeys(":" .. cmd .. " SomeV\<Tab>\<C-B>\"\<CR>", 'tx')
+ call assert_match('"' .. cmd .. ' SomeVar', @:)
+ call feedkeys(":" .. cmd .. " foo SomeV\<Tab>\<C-B>\"\<CR>", 'tx')
+ call assert_match('"' .. cmd .. ' foo SomeVar', @:)
+ endfor
+ unlet g:SomeVar
+endfunc
+
func Test_cmdline_write_alternatefile()
new
call setline('.', ['one', 'two'])