diff src/testdir/test_cmdline.vim @ 18977:5bef1043abff v8.2.0049

patch 8.2.0049: command line completion not fully tested Commit: https://github.com/vim/vim/commit/297610ba4b110c918ffe60c45eb4a1d6ea2daae5 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 27 17:20:55 2019 +0100 patch 8.2.0049: command line completion not fully tested Problem: Command line completion not fully tested. Solution: Add more test cases. Make help sorting stable. (Dominique Pelle, closes #5402)
author Bram Moolenaar <Bram@vim.org>
date Fri, 27 Dec 2019 17:30:03 +0100
parents a18d7782b80f
children 25a60d11adc2
line wrap: on
line diff
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -553,6 +553,14 @@ func Test_cmdline_complete_user_names()
   endif
 endfunc
 
+func Test_cmdline_complete_bang()
+  if executable('whoami')
+    return
+  endif
+  call feedkeys(":!whoam\<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_match('^".*\<whoami\>', @:)
+endfunc
+
 funct Test_cmdline_complete_languages()
   let lang = substitute(execute('language messages'), '.*"\(.*\)"$', '\1', '')
 
@@ -575,6 +583,15 @@ funct Test_cmdline_complete_languages()
   endif
 endfunc
 
+func Test_cmdline_complete_env_variable()
+  let $X_VIM_TEST_COMPLETE_ENV = 'foo'
+
+  call feedkeys(":edit $X_VIM_TEST_COMPLETE_E\<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_match('"edit $X_VIM_TEST_COMPLETE_ENV', @:)
+
+  unlet $X_VIM_TEST_COMPLETE_ENV
+endfunc
+
 func Test_cmdline_write_alternatefile()
   new
   call setline('.', ['one', 'two'])