Skip to content

Commit b513d30

Browse files
committed
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)
1 parent d2ec51f commit b513d30

6 files changed

Lines changed: 37 additions & 0 deletions

File tree

src/testdir/test_arglist.vim

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,18 @@ func Test_argdelete()
396396
%argd
397397
endfunc
398398

399+
func Test_argdelete_completion()
400+
args foo bar
401+
402+
call feedkeys(":argdelete \<C-A>\<C-B>\"\<CR>", 'tx')
403+
call assert_equal('"argdelete bar foo', @:)
404+
405+
call feedkeys(":argdelete x \<C-A>\<C-B>\"\<CR>", 'tx')
406+
call assert_equal('"argdelete x bar foo', @:)
407+
408+
%argd
409+
endfunc
410+
399411
" Tests for the :next, :prev, :first, :last, :rewind commands
400412
func Test_argpos()
401413
call Reset_arglist()

src/testdir/test_filetype.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,3 +597,7 @@ func Test_script_detection()
597597
filetype off
598598
endfunc
599599

600+
func Test_setfiletype_completion()
601+
call feedkeys(":setfiletype java\<C-A>\<C-B>\"\<CR>", 'tx')
602+
call assert_equal('"setfiletype java javacc javascript', @:)
603+
endfunc

src/testdir/test_history.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,8 @@ function Test_Search_history_window()
104104
call assert_equal('a', @/)
105105
bwipe!
106106
endfunc
107+
108+
function Test_history_completion()
109+
call feedkeys(":history \<C-A>\<C-B>\"\<CR>", 'tx')
110+
call assert_equal('"history / : = > ? @ all cmd debug expr input search', @:)
111+
endfunc

src/testdir/test_messages.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,8 @@ function! Test_stopinsert_does_not_break_message_output()
5959

6060
set cmdheight&
6161
endfunction
62+
63+
func Test_message_completion()
64+
call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
65+
call assert_equal('"message clear', @:)
66+
endfunc

src/testdir/test_syntax.vim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ func Test_syntime()
119119
bd
120120
endfunc
121121

122+
func Test_syntime_completion()
123+
if !has('profile')
124+
return
125+
endif
126+
127+
call feedkeys(":syntime \<C-A>\<C-B>\"\<CR>", 'tx')
128+
call assert_equal('"syntime clear off on report', @:)
129+
endfunc
130+
122131
func Test_syntax_list()
123132
syntax on
124133
let a = execute('syntax list')

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ static char *(features[]) =
792792

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
559,
795797
/**/
796798
558,
797799
/**/

0 commit comments

Comments
 (0)