forked from aniani/vim
patch 8.2.0522: several errors are not tested for
Problem: Several errors are not tested for. Solution: Add tests. (Yegappan Lakshmanan, closes #5892)
This commit is contained in:
@@ -210,6 +210,8 @@ func Test_digraphs()
|
||||
call Put_Dig("00")
|
||||
call Put_Dig("el")
|
||||
call assert_equal(['␀', 'ü', '∞', 'l'], getline(line('.')-3,line('.')))
|
||||
call assert_fails('exe "digraph a\<Esc> 100"', 'E104:')
|
||||
call assert_fails('exe "digraph \<Esc>a 100"', 'E104:')
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
@@ -475,4 +477,15 @@ func Test_show_digraph_cp1251()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Test for error in a keymap file
|
||||
func Test_loadkeymap_error()
|
||||
if !has('keymap')
|
||||
return
|
||||
endif
|
||||
call assert_fails('loadkeymap', 'E105:')
|
||||
call writefile(['loadkeymap', 'a'], 'Xkeymap')
|
||||
call assert_fails('source Xkeymap', 'E791:')
|
||||
call delete('Xkeymap')
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user