]> granicus.if.org Git - vim/commitdiff
patch 7.4.1994 v7.4.1994
authorBram Moolenaar <Bram@vim.org>
Thu, 7 Jul 2016 14:35:16 +0000 (16:35 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 7 Jul 2016 14:35:16 +0000 (16:35 +0200)
Problem:    True-false test fails.
Solution:   Filter the dict to only keep the value that matters.

src/testdir/test_true_false.vim
src/version.c

index f11d298ee6469f170e26525ae6817c0415eabb48..a23f2cc4b130d4915ed8a2cce680a62dad5ac8c9 100644 (file)
@@ -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)
 
index 996745596bfcdeb9825a4c43c9d8cf2f6459611b..8bb497d0278e2793b632ac304ff59e5d96bb379c 100644 (file)
@@ -758,6 +758,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1994,
 /**/
     1993,
 /**/