diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-25 11:06:19 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-25 11:06:19 +0800 |
| commit | e2a8ea76ea2f7d5e71441f0fac75df35caf85c03 (patch) | |
| tree | bd7967ac22e346178e5a6af5448d3631efc3c33f /src/nvim/testdir/test_functions.vim | |
| parent | 2b55d09314500c0049427cd51e873cc4eac223b2 (diff) | |
| parent | 0482f53395e7b26016942bd8e5a173a7894a44a5 (diff) | |
| download | rneovim-e2a8ea76ea2f7d5e71441f0fac75df35caf85c03.tar.gz rneovim-e2a8ea76ea2f7d5e71441f0fac75df35caf85c03.tar.bz2 rneovim-e2a8ea76ea2f7d5e71441f0fac75df35caf85c03.zip | |
Merge pull request #21185 from zeertzjq/vim-8.2.2466
vim-patch:8.2.{2466,2886},9.0.0936
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
| -rw-r--r-- | src/nvim/testdir/test_functions.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 5ff544ab55..1308beeae5 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -110,6 +110,10 @@ func Test_max() call assert_fails('call max(1)', 'E712:') " call assert_fails('call max(v:none)', 'E712:') + + " check we only get one error + call assert_fails('call max([#{}, [1]])', ['E728:', 'E728:']) + call assert_fails('call max(#{a: {}, b: [1]})', ['E728:', 'E728:']) endfunc func Test_min() @@ -123,6 +127,11 @@ 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:']) + call assert_fails('call min(#{a: [1], b: #{}})', ['E745:', 'E745:']) endfunc func Test_strwidth() @@ -583,6 +592,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 |