blob: 603135af29bee33aab437c51c19e6853b1373ff3 [file] [log] [blame]
Bram Moolenaar6315a9a2017-11-25 15:20:02 +01001if !has('multi_byte')
2 finish
3endif
4
5source view_util.vim
6
7let s:imactivatefunc_called = 0
8let s:imstatusfunc_called = 0
9
10func IM_activatefunc(active)
11 let s:imactivatefunc_called = 1
12endfunc
13
14func IM_statusfunc()
15 let s:imstatusfunc_called = 1
16 return 0
17endfunc
18
19func Test_iminsert2()
20 set imactivatefunc=IM_activatefunc
21 set imstatusfunc=IM_statusfunc
22 set iminsert=2
23 normal! i
24 set iminsert=0
25 set imactivatefunc=
26 set imstatusfunc=
27 call assert_equal(1, s:imactivatefunc_called)
28 call assert_equal(1, s:imstatusfunc_called)
29endfunc