view src/testdir/test_feedkeys.vim @ 14379:0f1446193ded v8.1.0204

patch 8.1.0204: inputlist() is not tested commit https://github.com/vim/vim/commit/947b39e761b8a95cc1bd37ad0c2c30552238809a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 22 19:36:37 2018 +0200 patch 8.1.0204: inputlist() is not tested Problem: inputlist() is not tested. Solution: Add a test. (Dominique Pelle, closes https://github.com/vim/vim/issues/3240)
author Christian Brabandt <cb@256bit.org>
date Sun, 22 Jul 2018 19:45: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