view src/testdir/test_feedkeys.vim @ 15182:4b2de998ebd6 v8.1.0601

patch 8.1.0601: a few compiler warnings commit https://github.com/vim/vim/commit/4efe73b478d3ba689078da502fd96f45204ff1f5 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 16 14:37:39 2018 +0100 patch 8.1.0601: a few compiler warnings Problem: A few compiler warnings. Solution: Add type casts. (Mike Williams)
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 Dec 2018 14:45:06 +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