diff src/testdir/test_filter_map.vim @ 15478:051937ebaf22 v8.1.0747

patch 8.1.0747: map() with a bad expression doesn't give an error commit https://github.com/vim/vim/commit/ce9d50df07402cb8e196537a9c4505845adecabc Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 14 22:22:29 2019 +0100 patch 8.1.0747: map() with a bad expression doesn't give an error Problem: map() with a bad expression doesn't give an error. (Ingo Karkat) Solution: Check for giving an error message. (closes https://github.com/vim/vim/issues/3800)
author Bram Moolenaar <Bram@vim.org>
date Mon, 14 Jan 2019 22:30:07 +0100
parents 4fe3772969cf
children 7f3283683d97
line wrap: on
line diff
--- a/src/testdir/test_filter_map.vim
+++ b/src/testdir/test_filter_map.vim
@@ -79,3 +79,8 @@ func Test_filter_map_dict_expr_funcref()
   endfunc
   call assert_equal({"foo": "f", "bar": "b", "baz": "b"}, map(copy(dict), function('s:filter4')))
 endfunc
+
+func Test_map_fails()
+  call assert_fails('call map([1], "42 +")', 'E15:')
+  call assert_fails('call filter([1], "42 +")', 'E15:')
+endfunc