summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-02 14:55:08 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-02 14:55:08 +0100
commitb513d3079bbe3f59a1f1a3d6931939a76cd7e54a (patch)
tree1683af0ef25f614588ca6ffb4ee9a12151763580
parentd2ec51f399607d2df6ed1155b0bd303e722d6978 (diff)
patch 8.1.0559: command line completion not sufficiently testedv8.1.0559
Problem: Command line completion not sufficiently tested. Solution: Add more tests. (Dominique Pelle, closes #3622)
-rw-r--r--src/testdir/test_arglist.vim12
-rw-r--r--src/testdir/test_filetype.vim4
-rw-r--r--src/testdir/test_history.vim5
-rw-r--r--src/testdir/test_messages.vim5
-rw-r--r--src/testdir/test_syntax.vim9
-rw-r--r--src/version.c2
6 files changed, 37 insertions, 0 deletions
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim
index b896c3dec6..cb1117eede 100644
--- 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()
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index d146bd2ce1..fd2f38355f 100644
--- 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
diff --git a/src/testdir/test_history.vim b/src/testdir/test_history.vim
index ca31e3f06c..16aad9889e 100644
--- 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
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index a85799e263..de14b81f9a 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -59,3 +59,8 @@ function! Test_stopinsert_does_not_break_message_output()
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 ffa8e9022b..c0be4a0eff 100644
--- 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')
diff --git a/src/version.c b/src/version.c
index b44f5b8850..bbf32f5c3c 100644
--- 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,