aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-17 16:22:11 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-08-17 16:40:51 +0800
commit1918e1ea6d0192712e0a03926e2965a7aac0955e (patch)
tree1173d0a434c4d3410d48e665bd18314d432982c6 /test
parentfb78c1983c267f622c1983a999f5fb8bdfc85c73 (diff)
downloadrneovim-1918e1ea6d0192712e0a03926e2965a7aac0955e.tar.gz
rneovim-1918e1ea6d0192712e0a03926e2965a7aac0955e.tar.bz2
rneovim-1918e1ea6d0192712e0a03926e2965a7aac0955e.zip
vim-patch:9.0.0359: error message for wrong argument type is not specific
Problem: Error message for wrong argument type is not specific. Solution: Include more information in the error. (Yegappan Lakshmanan, closes vim/vim#11037) https://github.com/vim/vim/commit/8deb2b30c77035bb682ccf80b781455ac1d6038b Cherry-pick test_listdict.vim changes from patch 8.2.4809. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_listdict.vim17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/old/testdir/test_listdict.vim b/test/old/testdir/test_listdict.vim
index f2b4747ff2..e82ea60d81 100644
--- a/test/old/testdir/test_listdict.vim
+++ b/test/old/testdir/test_listdict.vim
@@ -526,7 +526,7 @@ func Test_dict_deepcopy()
END
call CheckLegacyAndVim9Success(lines)
- call assert_fails("call deepcopy([1, 2], 2)", 'E1023:')
+ call assert_fails("call deepcopy([1, 2], 2)", 'E1212:')
endfunc
" Locked variables
@@ -952,25 +952,26 @@ 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(v:_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(v:_null_string, { acc, val -> acc + val })", 'E998: Reduce of an empty String with no initial value')
call assert_fails("call reduce({}, { acc, val -> acc + val }, 1)", 'E1098:')
call assert_fails("call reduce(0, { acc, val -> acc + val }, 1)", 'E1098:')
call assert_fails("call reduce([1, 2], 'Xdoes_not_exist')", 'E117:')
- call assert_fails("echo reduce(0z01, { acc, val -> 2 * acc + val }, '')", 'E39:')
+ call assert_fails("echo reduce(0z01, { acc, val -> 2 * acc + val }, '')", 'E1210:')
" call assert_fails("vim9 reduce(0, (acc, val) => (acc .. val), '')", 'E1252:')
" call assert_fails("vim9 reduce({}, (acc, val) => (acc .. val), '')", 'E1252:')
" call assert_fails("vim9 reduce(0.1, (acc, val) => (acc .. val), '')", 'E1252:')
" call assert_fails("vim9 reduce(function('tr'), (acc, val) => (acc .. val), '')", 'E1252:')
- call assert_fails("call reduce('', { acc, val -> acc + val }, 1)", 'E1253:')
- call assert_fails("call reduce('', { acc, val -> acc + val }, {})", 'E1253:')
- 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('', { acc, val -> acc + val }, 1)", 'E1174:')
+ call assert_fails("call reduce('', { acc, val -> acc + val }, {})", 'E1174:')
+ call assert_fails("call reduce('', { acc, val -> acc + val }, 0.1)", 'E1174:')
+ call assert_fails("call reduce('', { acc, val -> acc + val }, function('tr'))", 'E1174:')
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()