1
0
forked from aniani/vim

patch 8.2.2886: various pieces of code not covered by tests

Problem:    Various pieces of code not covered by tests.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8255)
This commit is contained in:
Yegappan Lakshmanan
2021-05-25 20:14:00 +02:00
committed by Bram Moolenaar
parent 872bee557e
commit 34fcb69724
9 changed files with 53 additions and 0 deletions

View File

@@ -141,6 +141,7 @@ func Test_min()
call assert_fails('call min(1)', 'E712:')
call assert_fails('call min(v:none)', 'E712:')
call assert_fails('call min([1, {}])', 'E728:')
" check we only get one error
call assert_fails('call min([[1], #{}])', ['E745:', 'E745:'])
@@ -715,6 +716,7 @@ func Test_tr()
call assert_fails("let s=tr('abcd', 'abcd', 'def')", 'E475:')
call assert_equal('hEllO', tr('hello', 'eo', 'EO'))
call assert_equal('hello', tr('hello', 'xy', 'ab'))
call assert_fails('call tr("abc", "123", "₁₂")', 'E475:')
set encoding=utf8
endfunc
@@ -2674,4 +2676,9 @@ func Test_default_arg_value()
call assert_equal('msg', HasDefault())
endfunc
" Test for gettext()
func Test_gettext()
call assert_fails('call gettext(1)', 'E475:')
endfunc
" vim: shiftwidth=2 sts=2 expandtab