view src/testdir/test_feedkeys.vim @ 18552:17ec36265fcb v8.1.2270

patch 8.1.2270: "gf" is not tested in Visual mode Commit: https://github.com/vim/vim/commit/0208b6b771161d1a668b3568f71dc2bde3614933 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Nov 8 21:49:48 2019 +0100 patch 8.1.2270: "gf" is not tested in Visual mode Problem: "gf" is not tested in Visual mode. Solution: Add Visual mode test and test errors. (Dominique Pelle, closes #5197)
author Bram Moolenaar <Bram@vim.org>
date Fri, 08 Nov 2019 22:00:04 +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