view src/testdir/test_feedkeys.vim @ 19417:21eefaf6bc5b v8.2.0266

patch 8.2.0266: terminal in popup test sometimes fails on Mac Commit: https://github.com/vim/vim/commit/a28be85ccde03ee0a0dc984dfd7396c50713b593 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 16 17:04:09 2020 +0100 patch 8.2.0266: terminal in popup test sometimes fails on Mac Problem: Terminal in popup test sometimes fails on Mac. Solution: Add a short delay.
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 Feb 2020 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