view src/testdir/test_langmap.vim @ 11046:d48f4eeb91ec v8.0.0412

patch 8.0.0412: menu test fails on MS-Windows commit https://github.com/vim/vim/commit/5558d19432120696409c007c64d5ba52eed42670 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 4 21:02:22 2017 +0100 patch 8.0.0412: menu test fails on MS-Windows Problem: Menu test fails on MS-Windows. Solution: Use a menu entry with only ASCII characters.
author Christian Brabandt <cb@256bit.org>
date Sat, 04 Mar 2017 21:15:05 +0100
parents 1a595b2a4d5e
children f38fcbf343ce
line wrap: on
line source

" tests for 'langmap'

if !has('langmap')
  finish
endif

func Test_langmap()
  new
  set langmap=}l,^x,%v

  call setline(1, ['abc'])
  call feedkeys('gg0}^', 'tx')
  call assert_equal('ac', getline(1))

  " in Replace mode
  " need silent! to avoid a delay when entering Insert mode
  call setline(1, ['abcde'])
  silent! call feedkeys("gg0lR%{z\<Esc>00", 'tx')
  call assert_equal('a%{ze', getline(1))

  " in Select mode
  " need silent! to avoid a delay when entering Insert mode
  call setline(1, ['abcde'])
  silent! call feedkeys("gg0}%}\<C-G>}^\<Esc>00", 'tx')
  call assert_equal('a}^de', getline(1))

  quit!
endfunc