view src/testdir/test_feedkeys.vim @ 18983:54baf548bff9 v8.2.0052

patch 8.2.0052: more-prompt not properly tested Commit: https://github.com/vim/vim/commit/c6d539b67181ad573452e919e58ecbfa362f4c49 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 28 17:10:46 2019 +0100 patch 8.2.0052: more-prompt not properly tested Problem: More-prompt not properly tested. Solution: Add a test case. (Dominique Pelle, closes https://github.com/vim/vim/issues/5404)
author Bram Moolenaar <Bram@vim.org>
date Sat, 28 Dec 2019 17:15: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