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)
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 837ef63..38b5826 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -553,6 +553,14 @@
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 @@
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'])