view src/testdir/test_feedkeys.vim @ 16115:91da8cd462ef v8.1.1062

patch 8.1.1062: quickfix code is repeated commit https://github.com/vim/vim/commit/a16123a666b4656543614cb5bdaa69ea69f35d30 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 28 20:31:07 2019 +0100 patch 8.1.1062: quickfix code is repeated Problem: Quickfix code is repeated. Solution: Define FOR_ALL_QFL_ITEMS(). Move some code to separate functions. (Yegappan Lakshmanan, closes #4166)
author Bram Moolenaar <Bram@vim.org>
date Thu, 28 Mar 2019 20:45: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