0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.2.0576: some errors are not covered by tests

Problem:    Some errors are not covered by tests.
Solution:   Add a few more tests. (Dominique Pelle, closes #5920)
This commit is contained in:
Bram Moolenaar 2020-04-13 19:55:50 +02:00
parent e3242346cf
commit 067297e16a
5 changed files with 19 additions and 0 deletions

View File

@ -155,4 +155,15 @@ func Test_bdelete_cmd()
%bwipe!
endfunc
func Test_buffer_error()
new foo1
new foo2
call assert_fails('buffer foo', 'E93:')
call assert_fails('buffer bar', 'E94:')
call assert_fails('buffer 0', 'E939:')
%bwipe
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@ -212,6 +212,8 @@ func Test_digraphs()
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:')
call assert_fails('digraph xy z', 'E39:')
call assert_fails('digraph x', 'E474:')
bw!
endfunc

View File

@ -373,8 +373,10 @@ function Test_printf_errors()
call assert_fails('echo printf("%d", [])', 'E745:')
call assert_fails('echo printf("%d", 1, 2)', 'E767:')
call assert_fails('echo printf("%*d", 1)', 'E766:')
call assert_fails('echo printf("%s")', 'E766:')
if has('float')
call assert_fails('echo printf("%d", 1.2)', 'E805:')
call assert_fails('echo printf("%f")')
endif
endfunc

View File

@ -40,6 +40,8 @@ function Test_messages()
finally
let &more = oldmore
endtry
call assert_fails('message 1', 'E474:')
endfunction
" Patch 7.4.1696 defined the "clearmode()" function for clearing the mode

View File

@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
576,
/**/
575,
/**/