view src/testdir/test_feedkeys.vim @ 15630:db6cfc44eb65 v8.1.0823

patch 8.1.0823: not sufficient testing of xxd commit https://github.com/vim/vim/commit/203651b9b2e2f478c9a2be25f86ce9712a21a796 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 26 14:11:19 2019 +0100 patch 8.1.0823: not sufficient testing of xxd Problem: Not sufficient testing of xxd. Solution: Add some more test coverage.
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Jan 2019 14:15:12 +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