# HG changeset patch # User Bram Moolenaar # Date 1543759205 -3600 # Node ID 1946487c74ba949000ee08fa2a00a02638963bb5 # Parent f46ed63e2ce0c12885d79b908aa36875b4a29cb8 patch 8.1.0559: command line completion not sufficiently tested commit https://github.com/vim/vim/commit/b513d3079bbe3f59a1f1a3d6931939a76cd7e54a Author: Bram Moolenaar 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) diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim --- 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 \\\"\", 'tx') + call assert_equal('"argdelete bar foo', @:) + + call feedkeys(":argdelete x \\\"\", '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 --- 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\\\"\", 'tx') + call assert_equal('"setfiletype java javacc javascript', @:) +endfunc diff --git a/src/testdir/test_history.vim b/src/testdir/test_history.vim --- 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 \\\"\", '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 --- 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 \\\"\", 'tx') + call assert_equal('"message clear', @:) +endfunc diff --git a/src/testdir/test_syntax.vim b/src/testdir/test_syntax.vim --- 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 \\\"\", '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 --- 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,