diff src/testdir/test_filter_map.vim @ 20128:0b35a7ffceb2 v8.2.0619

patch 8.2.0619: null dict is not handled like an empty dict Commit: https://github.com/vim/vim/commit/ea04a6e8baff2f27da7cdd54bf70a5525994f76d Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 23 13:38:02 2020 +0200 patch 8.2.0619: null dict is not handled like an empty dict Problem: Null dict is not handled like an empty dict. Solution: Fix the code and add tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5968)
author Bram Moolenaar <Bram@vim.org>
date Thu, 23 Apr 2020 13:45:04 +0200
parents e82996ad131f
children 49694eceaa55
line wrap: on
line diff
--- a/src/testdir/test_filter_map.vim
+++ b/src/testdir/test_filter_map.vim
@@ -96,6 +96,7 @@ func Test_map_filter_fails()
   call assert_fails("let l = filter('abc', '\"> \" . v:val')", 'E712:')
   call assert_fails("let l = filter([1, 2, 3], '{}')", 'E728:')
   call assert_fails("let l = filter({'k' : 10}, '{}')", 'E728:')
+  call assert_fails("let l = filter([1, 2], {})", 'E731:')
   call assert_equal(0, map(test_null_list(), '"> " .. v:val'))
   call assert_equal(0, map(test_null_dict(), '"> " .. v:val'))
 endfunc