patch 8.1.0559: command line completion not sufficiently tested
Problem: Command line completion not sufficiently tested.
Solution: Add more tests. (Dominique Pelle, closes #3622)
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim
index b896c3d..cb1117e 100644
--- a/src/testdir/test_arglist.vim
+++ b/src/testdir/test_arglist.vim
@@ -396,6 +396,18 @@
%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()
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index d146bd2..fd2f383 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -597,3 +597,7 @@
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
diff --git a/src/testdir/test_history.vim b/src/testdir/test_history.vim
index ca31e3f..16aad98 100644
--- a/src/testdir/test_history.vim
+++ b/src/testdir/test_history.vim
@@ -104,3 +104,8 @@
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
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index a85799e..de14b81 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -59,3 +59,8 @@
set cmdheight&
endfunction
+
+func Test_message_completion()
+ call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_equal('"message clear', @:)
+endfunc
diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim
index ffa8e90..c0be4a0 100644
--- a/src/testdir/test_syntax.vim
+++ b/src/testdir/test_syntax.vim
@@ -119,6 +119,15 @@
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')
diff --git a/src/version.c b/src/version.c
index b44f5b8..bbf32f5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -793,6 +793,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 559,
+/**/
558,
/**/
557,