view src/testdir/test_feedkeys.vim @ 15984:9a4cfad3713a

Added tag v8.1.0997 for changeset e73ed0e3faac8bd36bf73c8196bebb0e636bf2f2
author Bram Moolenaar <Bram@vim.org>
date Thu, 07 Mar 2019 06:45:10 +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