Mercurial > vim
diff src/testdir/test_functions.vim @ 24695:13efbfc53054 v8.2.2886
patch 8.2.2886: various pieces of code not covered by tests
Commit: https://github.com/vim/vim/commit/34fcb697240c1bc9e69417ed75db3b1a83479724
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue May 25 20:14:00 2021 +0200
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 https://github.com/vim/vim/issues/8255)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 25 May 2021 20:15:03 +0200 |
parents | 04205b7d67d5 |
children | ca0f983f08cf |
line wrap: on
line diff
--- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -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