view src/testdir/test_feedkeys.vim @ 21397:62339482daab v8.2.1249

patch 8.2.1249: Vim9: disassemble test fails Commit: https://github.com/vim/vim/commit/747f11ad6ecad4dd85ce386a0a539cb853fec41a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 19 18:38:37 2020 +0200 patch 8.2.1249: Vim9: disassemble test fails Problem: Vim9: disassemble test fails. Solution: Change INDEX to LISTINDEX. Add test for STRINDEX.
author Bram Moolenaar <Bram@vim.org>
date Sun, 19 Jul 2020 18:45:03 +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