diff src/testdir/test_true_false.vim @ 9426:d606560082e6 v7.4.1994

commit https://github.com/vim/vim/commit/05e418d436410cd8bbf5a29ff81e8ad68408b1e8 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 7 16:35:16 2016 +0200 patch 7.4.1994 Problem: True-false test fails. Solution: Filter the dict to only keep the value that matters.
author Christian Brabandt <cb@256bit.org>
date Thu, 07 Jul 2016 16:45:07 +0200
parents fd4e6d944f4a
children af3d441845cd
line wrap: on
line diff
--- a/src/testdir/test_true_false.vim
+++ b/src/testdir/test_true_false.vim
@@ -91,8 +91,14 @@ func Test_true_false_arg()
 
   call Try_arg_true_false('index(["a", "A"], "A", 0, %v%)', 1, 0)
 
+  function FilterMapArg(d)
+    if type(a:d) == type({})
+      return filter(a:d, 'v:key == "rhs"')
+    endif
+    return a:d
+  endfunction
   call Try_arg_true_false('maparg("asdf", "i", %v%)', "", "asdff")
-  call Try_arg_true_false('maparg("asdf", "i", 1, %v%)', "asdff", {'silent': 0, 'noremap': 0, 'lhs': 'asdf', 'mode': '!', 'nowait': 0, 'expr': 0, 'sid': 3, 'rhs': 'asdff', 'buffer': 0})
+  call Try_arg_true_false('FilterMapArg(maparg("asdf", "i", 1, %v%))', "asdff", {'rhs': 'asdff'})
 
   call Try_arg_true_false('hasmapto("asdf", "i", %v%)', 0, 1)