forked from aniani/vim
patch 8.2.2994: various code is not fully tested
Problem: Various code is not fully tested. Solution: Add a few more tests. (Yegappan Lakshmanan, closes #8378)
This commit is contained in:
committed by
Bram Moolenaar
parent
5ffefbb35a
commit
2d6d718dde
@@ -485,6 +485,11 @@ func Test_list_mappings()
|
||||
call assert_equal(['n ,k <Nop>'],
|
||||
\ execute('nmap ,k')->trim()->split("\n"))
|
||||
|
||||
" map with space at the beginning
|
||||
exe "nmap \<C-V> w <Nop>"
|
||||
call assert_equal(['n <Space>w <Nop>'],
|
||||
\ execute("nmap \<C-V> w")->trim()->split("\n"))
|
||||
|
||||
nmapclear
|
||||
endfunc
|
||||
|
||||
@@ -1411,4 +1416,19 @@ func Test_abbreviate_multi_byte()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Test for abbreviations with 'latin1' encoding
|
||||
func Test_abbreviate_latin1_encoding()
|
||||
set encoding=latin1
|
||||
call assert_fails('abbr ab#$c ABC', 'E474:')
|
||||
new
|
||||
iabbr <buffer> #i #include
|
||||
iabbr <buffer> ## #enddef
|
||||
exe "normal i#i\<C-]>"
|
||||
call assert_equal('#include', getline(1))
|
||||
exe "normal 0Di##\<C-]>"
|
||||
call assert_equal('#enddef', getline(1))
|
||||
%bw!
|
||||
set encoding=utf-8
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Reference in New Issue
Block a user