0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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)
This commit is contained in:
Bram Moolenaar 2018-12-02 14:55:08 +01:00
parent d2ec51f399
commit b513d3079b
6 changed files with 37 additions and 0 deletions

View File

@ -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()

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -792,6 +792,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
559,
/**/
558,
/**/