view src/testdir/test_feedkeys.vim @ 16172:6b0836727cf3 v8.1.1091

patch 8.1.1091: MS-Windows: cannot use multi-byte chars in environment var commit https://github.com/vim/vim/commit/f0908e6fe18943ad4453d7d6772fa43049aff4bc Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 30 20:11:50 2019 +0100 patch 8.1.1091: MS-Windows: cannot use multi-byte chars in environment var Problem: MS-Windows: cannot use multi-byte chars in environment var. Solution: Use the wide API. (Ken Takata, closes https://github.com/vim/vim/issues/4008)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Mar 2019 20:15:05 +0100
parents 6b70b9cdebfc
children 08940efa6b4e
line wrap: on
line source

" Test feedkeys() function.

func Test_feedkeys_x_with_empty_string()
  new
  call feedkeys("ifoo\<Esc>")
  call assert_equal('', getline('.'))
  call feedkeys('', 'x')
  call assert_equal('foo', getline('.'))

  " check it goes back to normal mode immediately.
  call feedkeys('i', 'x')
  call assert_equal('foo', getline('.'))
  quit!
endfunc