mirror of
https://github.com/neovim/neovim.git
synced 2024-12-21 19:55:04 -07:00
vim-patch:8.2.0829: filter() may give misleading error message
Problem: filter() may give misleading error message.
Solution: Also mention Blob as an allowed argument.
fcb0b61d15
Rename Test_map_fails() to Test_map_filter_fails() from v8.2.0610 and
include the modeline.
This commit is contained in:
parent
19232593ba
commit
ffaf881b42
@ -6393,7 +6393,7 @@ void filter_map(typval_T *argvars, typval_T *rettv, int map)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
EMSG2(_(e_listdictarg), ermsg);
|
||||
EMSG2(_(e_listdictblobarg), ermsg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,11 @@ func Test_filter_map_dict_expr_funcref()
|
||||
call assert_equal({"foo": "f", "bar": "b", "baz": "b"}, map(copy(dict), function('s:filter4')))
|
||||
endfunc
|
||||
|
||||
func Test_map_fails()
|
||||
func Test_map_filter_fails()
|
||||
call assert_fails('call map([1], "42 +")', 'E15:')
|
||||
call assert_fails('call filter([1], "42 +")', 'E15:')
|
||||
call assert_fails("let l = map('abc', '\"> \" . v:val')", 'E896:')
|
||||
call assert_fails("let l = filter('abc', '\"> \" . v:val')", 'E896:')
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Loading…
Reference in New Issue
Block a user