changeset 15097:1946487c74ba v8.1.0559

patch 8.1.0559: command line completion not sufficiently tested commit https://github.com/vim/vim/commit/b513d3079bbe3f59a1f1a3d6931939a76cd7e54a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 2 14:55:08 2018 +0100 patch 8.1.0559: command line completion not sufficiently tested Problem: Command line completion not sufficiently tested. Solution: Add more tests. (Dominique Pelle, closes https://github.com/vim/vim/issues/3622)
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Dec 2018 15:00:05 +0100
parents f46ed63e2ce0
children fe8031c9de2e
files src/testdir/test_arglist.vim src/testdir/test_filetype.vim src/testdir/test_history.vim src/testdir/test_messages.vim src/testdir/test_syntax.vim src/version.c
diffstat 6 files changed, 37 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_arglist.vim
+++ b/src/testdir/test_arglist.vim
@@ -396,6 +396,18 @@ func Test_argdelete()
   %argd
 endfunc
 
+func Test_argdelete_completion()
+  args foo bar
+
+  call feedkeys(":argdelete \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"argdelete bar foo', @:)
+
+  call feedkeys(":argdelete x \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"argdelete x bar foo', @:)
+
+  %argd
+endfunc
+
 " Tests for the :next, :prev, :first, :last, :rewind commands
 func Test_argpos()
   call Reset_arglist()
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -597,3 +597,7 @@ func Test_script_detection()
   filetype off
 endfunc
 
+func Test_setfiletype_completion()
+  call feedkeys(":setfiletype java\<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"setfiletype java javacc javascript', @:)
+endfunc
--- a/src/testdir/test_history.vim
+++ b/src/testdir/test_history.vim
@@ -104,3 +104,8 @@ function Test_Search_history_window()
   call assert_equal('a', @/)
   bwipe!
 endfunc
+
+function Test_history_completion()
+  call feedkeys(":history \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"history / : = > ? @ all cmd debug expr input search', @:)
+endfunc
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -59,3 +59,8 @@ function! Test_stopinsert_does_not_break
 
   set cmdheight&
 endfunction
+
+func Test_message_completion()
+  call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"message clear', @:)
+endfunc
--- a/src/testdir/test_syntax.vim
+++ b/src/testdir/test_syntax.vim
@@ -119,6 +119,15 @@ func Test_syntime()
   bd
 endfunc
 
+func Test_syntime_completion()
+  if !has('profile')
+    return
+  endif
+
+  call feedkeys(":syntime \<C-A>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"syntime clear off on report', @:)
+endfunc
+
 func Test_syntax_list()
   syntax on
   let a = execute('syntax list')
--- a/src/version.c
+++ b/src/version.c
@@ -793,6 +793,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    559,
+/**/
     558,
 /**/
     557,