@@ -47,53 +47,83 @@ func Test_getcompletion()
4747
4848 let l = getcompletion (' v:n' , ' var' )
4949 call assert_true (index (l , ' v:null' ) >= 0 )
50+ let l = getcompletion (' v:notexists' , ' var' )
51+ call assert_equal ([], l )
5052
5153 let l = getcompletion (' ' , ' augroup' )
5254 call assert_true (index (l , ' END' ) >= 0 )
55+ let l = getcompletion (' blahblah' , ' augroup' )
56+ call assert_equal ([], l )
5357
5458 let l = getcompletion (' ' , ' behave' )
5559 call assert_true (index (l , ' mswin' ) >= 0 )
60+ let l = getcompletion (' not' , ' behave' )
61+ call assert_equal ([], l )
5662
5763 let l = getcompletion (' ' , ' color' )
5864 call assert_true (index (l , ' default' ) >= 0 )
65+ let l = getcompletion (' dirty' , ' color' )
66+ call assert_equal ([], l )
5967
6068 let l = getcompletion (' ' , ' command' )
6169 call assert_true (index (l , ' sleep' ) >= 0 )
70+ let l = getcompletion (' awake' , ' command' )
71+ call assert_equal ([], l )
6272
6373 let l = getcompletion (' ' , ' dir' )
64- call assert_true (index (l , ' samples' ) >= 0 )
74+ call assert_true (index (l , ' samples/' ) >= 0 )
75+ let l = getcompletion (' NoMatch' , ' dir' )
76+ call assert_equal ([], l )
6577
6678 let l = getcompletion (' exe' , ' expression' )
6779 call assert_true (index (l , ' executable(' ) >= 0 )
80+ let l = getcompletion (' kill' , ' expression' )
81+ call assert_equal ([], l )
6882
6983 let l = getcompletion (' tag' , ' function' )
7084 call assert_true (index (l , ' taglist(' ) >= 0 )
85+ let l = getcompletion (' paint' , ' function' )
86+ call assert_equal ([], l )
7187
7288 let Flambda = {- > ' hello' }
7389 let l = getcompletion (' ' , ' function' )
7490 let l = filter (l , {i , v - > v = ~ ' lambda' })
75- call assert_equal (0 , len ( l ) )
91+ call assert_equal ([], l )
7692
7793 let l = getcompletion (' run' , ' file' )
7894 call assert_true (index (l , ' runtest.vim' ) >= 0 )
95+ let l = getcompletion (' walk' , ' file' )
96+ call assert_equal ([], l )
7997
8098 let l = getcompletion (' ha' , ' filetype' )
8199 call assert_true (index (l , ' hamster' ) >= 0 )
100+ let l = getcompletion (' horse' , ' filetype' )
101+ call assert_equal ([], l )
82102
83103 let l = getcompletion (' z' , ' syntax' )
84104 call assert_true (index (l , ' zimbu' ) >= 0 )
105+ let l = getcompletion (' emacs' , ' syntax' )
106+ call assert_equal ([], l )
85107
86108 let l = getcompletion (' jikes' , ' compiler' )
87109 call assert_true (index (l , ' jikes' ) >= 0 )
110+ let l = getcompletion (' break' , ' compiler' )
111+ call assert_equal ([], l )
88112
89113 let l = getcompletion (' last' , ' help' )
90114 call assert_true (index (l , ' :tablast' ) >= 0 )
115+ let l = getcompletion (' giveup' , ' help' )
116+ call assert_equal ([], l )
91117
92118 let l = getcompletion (' time' , ' option' )
93119 call assert_true (index (l , ' timeoutlen' ) >= 0 )
120+ let l = getcompletion (' space' , ' option' )
121+ call assert_equal ([], l )
94122
95123 let l = getcompletion (' er' , ' highlight' )
96124 call assert_true (index (l , ' ErrorMsg' ) >= 0 )
125+ let l = getcompletion (' dark' , ' highlight' )
126+ call assert_equal ([], l )
97127
98128 " For others test if the name is recognized.
99129 let names = [' buffer' , ' environment' , ' file_in_path' ,
0 commit comments