view src/testdir/test_feedkeys.vim @ 14752:c54f69fabee9 v8.1.0388

patch 8.1.0388: Coverity complains about possible NULL pointer use commit https://github.com/vim/vim/commit/bf1c1b85136bbbe55a50c9cd01ed064d8df75697 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 13 21:30:05 2018 +0200 patch 8.1.0388: Coverity complains about possible NULL pointer use Problem: Coverity complains about possible NULL pointer use. Solution: Use get_tv_string() instead of get_tv_string_chk().
author Christian Brabandt <cb@256bit.org>
date Thu, 13 Sep 2018 21: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