changeset 30924:ae3970cc28cb v9.0.0796

patch 9.0.0796: mapping test fails in some situations Commit: https://github.com/vim/vim/commit/060b8384888ce91b1bc194101091d0f9f85d0490 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Oct 19 14:48:14 2022 +0100 patch 9.0.0796: mapping test fails in some situations Problem: Mapping test fails in some situations. Solution: Find the line with the verbose information.
author Bram Moolenaar <Bram@vim.org>
date Wed, 19 Oct 2022 16:00:03 +0200
parents bbc069df8597
children c3cc9609b2fc
files src/testdir/test_mapping.vim src/version.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -478,8 +478,12 @@ func Test_list_mappings()
         \ execute('nmap ,n')->trim()->split("\n"))
 
   " verbose map
+  " first line might be "seen modifyOtherKeys"
+  let lines = execute('verbose map ,n')->trim()->split("\n")
+  let index = indexof(lines, 'v:val =~ "Last set"')
+  call assert_inrange(1, 2, index)
   call assert_match("\tLast set from .*/test_mapping.vim line \\d\\+$",
-        \ execute('verbose map ,n')->trim()->split("\n")[1])
+        \ lines[index])
 
   " character with K_SPECIAL byte in rhs
   nmap foo …
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    796,
+/**/
     795,
 /**/
     794,