view src/testdir/test_feedkeys.vim @ 15612:e08d1aa308d8

Added tag v8.1.0813 for changeset bfcd7ffe9ac2b7ed03f321013363de56ab5b423b
author Bram Moolenaar <Bram@vim.org>
date Thu, 24 Jan 2019 19:45:08 +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