Mercurial > vim
diff src/testdir/test_listdict.vim @ 28570:35e24d9de858 v8.2.4809
patch 8.2.4809: various things no6 properly tested
Commit: https://github.com/vim/vim/commit/885de449c0c0ef4a8541ed1f5377351844384516
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sat Apr 23 10:51:14 2022 +0100
patch 8.2.4809: various things no6 properly tested
Problem: Various things no6 properly tested.
Solution: Add various test cases. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/10259)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 23 Apr 2022 12:00:06 +0200 |
parents | b96409b84eaf |
children | bdb31515f78b |
line wrap: on
line diff
--- a/src/testdir/test_listdict.vim +++ b/src/testdir/test_listdict.vim @@ -1017,6 +1017,7 @@ func Test_reduce() call assert_fails("call reduce([], { acc, val -> acc + val })", 'E998: Reduce of an empty List with no initial value') call assert_fails("call reduce(0z, { acc, val -> acc + val })", 'E998: Reduce of an empty Blob with no initial value') + call assert_fails("call reduce(test_null_blob(), { acc, val -> acc + val })", 'E998: Reduce of an empty Blob with no initial value') call assert_fails("call reduce('', { acc, val -> acc + val })", 'E998: Reduce of an empty String with no initial value') call assert_fails("call reduce(test_null_string(), { acc, val -> acc + val })", 'E998: Reduce of an empty String with no initial value') @@ -1034,8 +1035,8 @@ func Test_reduce() call assert_fails("call reduce('', { acc, val -> acc + val }, 0.1)", 'E1253:') call assert_fails("call reduce('', { acc, val -> acc + val }, function('tr'))", 'E1253:') call assert_fails("call reduce('abc', { a, v -> a10}, '')", 'E121:') - call assert_fails("call reduce(0z01, { a, v -> a10}, 1)", 'E121:') - call assert_fails("call reduce([1], { a, v -> a10}, '')", 'E121:') + call assert_fails("call reduce(0z0102, { a, v -> a10}, 1)", 'E121:') + call assert_fails("call reduce([1, 2], { a, v -> a10}, '')", 'E121:') let g:lut = [1, 2, 3, 4] func EvilRemove()