1" tests for 'langmap' 2 3if !has('langmap') 4 finish 5endif 6 7func Test_langmap() 8 new 9 set langmap=}l,^x,%v 10 11 call setline(1, ['abc']) 12 call feedkeys('gg0}^', 'tx') 13 call assert_equal('ac', getline(1)) 14 15 " in Replace mode 16 " need silent! to avoid a delay when entering Insert mode 17 call setline(1, ['abcde']) 18 silent! call feedkeys("gg0lR%{z\<Esc>00", 'tx') 19 call assert_equal('a%{ze', getline(1)) 20 21 " in Select mode 22 " need silent! to avoid a delay when entering Insert mode 23 call setline(1, ['abcde']) 24 silent! call feedkeys("gg0}%}\<C-G>}^\<Esc>00", 'tx') 25 call assert_equal('a}^de', getline(1)) 26 27 quit! 28endfunc 29