diff src/testdir/test_mapping.vim @ 31241:ee50174810ac v9.0.0954

patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled Commit: https://github.com/vim/vim/commit/c255b789653120979eacdf8bb8eca02487753a8e Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 26 19:16:48 2022 +0000 patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled Problem: Cannot detect whether modifyOtherKeys is enabled. Solution: Use XTQMODKEYS introduced by xterm version 377 to request the modifyOtherKeys level. Update the keycode check results.
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Nov 2022 20:30:03 +0100
parents 6a2b04cd0213
children fbc4d3b0302d
line wrap: on
line diff
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -478,10 +478,24 @@ 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")
+
+  " Remove "Seen modifyOtherKeys" and other optional info.
+  if lines[0] =~ 'Seen modifyOtherKeys'
+    call remove(lines, 0)
+  endif
+  if lines[0] =~ 'modifyOtherKeys detected:'
+    call remove(lines, 0)
+  endif
+  if lines[0] =~ 'Kitty keyboard protocol:'
+    call remove(lines, 0)
+  endif
+  if lines[0] == ''
+    call remove(lines, 0)
+  endif
+
   let index = indexof(lines, 'v:val =~ "Last set"')
-  call assert_inrange(1, 2, index)
+  call assert_equal(1, index)
   call assert_match("\tLast set from .*/test_mapping.vim line \\d\\+$",
         \ lines[index])