-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_simple_insert_mode.vim
46 lines (40 loc) · 1.28 KB
/
test_simple_insert_mode.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
function SetUp()
let init_script = g:test_path . '/../support/test_simple.vim'
execute 'source ' . init_script
endfunction
function Test_Popup_Menu_Expression_Register()
function TestPopupContents()
let items = complete_info().items
call map( items, {index, value -> value.word} )
call assert_equal( [ 'Mar', 'May' ], items )
return ''
endfunction
call feedkeys( "iM\<C-x>\<C-u>\<C-r>=TestPopupContents()\<CR>", "xt" )
call assert_equal( "Mar", getline( 1 ) )
delfunc! TestPopupContents
%bwipe!
endfunction
function Test_Simple_Empty()
function TestPopupContents()
let items = complete_info().items
call map( items, {index, value -> value.word} )
call assert_equal( [ 'Jan',
\ 'Feb',
\ 'Mar',
\ 'Apr',
\ 'May',
\ 'Jun',
\ 'Jul',
\ 'Aug',
\ 'Sep',
\ 'Oct',
\ 'Nov',
\ 'Dec' ],
\ items )
return ''
endfunction
call feedkeys( "i\<C-x>\<C-u>\<C-r>=TestPopupContents()\<CR>", "xt" )
call assert_equal( "Jan", getline( 1 ) )
delfunc! TestPopupContents
%bwipe!
endfunction