view src/testdir/test_feedkeys.vim @ 9632:3e0ab13ddd12 v7.4.2093

commit https://github.com/vim/vim/commit/a58c58b7e1404bb91d59d14539b41390284e7026 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 23 14:01:15 2016 +0200 patch 7.4.2093 Problem: Netbeans test fails once in a while. Leaving log file behind. Solution: Add it to the list of flaky tests. Disable logfile.
author Christian Brabandt <cb@256bit.org>
date Sat, 23 Jul 2016 14:15:05 +0200
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