view src/testdir/test_feedkeys.vim @ 20225:eaaee0dfa435 v8.2.0668

patch 8.2.0668: compiler warning for int/size_t usage Commit: https://github.com/vim/vim/commit/7f6f56f43c48f0b7288a4edd12b59fa7335f01d3 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 30 20:21:43 2020 +0200 patch 8.2.0668: compiler warning for int/size_t usage Problem: Compiler warning for int/size_t usage. Solution: Change "int" to "size_t". (Mike Williams)
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 Apr 2020 20:30:04 +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