vim-patch:8.1.0559: command line completion not sufficiently tested

Problem:    Command line completion not sufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes vim/vim#3622)
b513d3079b
This commit is contained in:
Jan Edmund Lazo 2018-12-03 22:46:11 -05:00
parent 7e97587dae
commit abd32c1bb8
5 changed files with 35 additions and 0 deletions

View File

@ -297,6 +297,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

@ -596,3 +596,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

@ -38,3 +38,8 @@ function Test_messages()
let &more = oldmore
endtry
endfunction
func Test_message_completion()
call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"message clear', @:)
endfunc

View File

@ -114,6 +114,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')