view src/testdir/test_feedkeys.vim @ 17680:55704f587945 v8.1.1837

patch 8.1.1837: popup test fails if clipboard is supported but not working commit https://github.com/vim/vim/commit/4999a7fb6585915b53888c930067b33c01674678 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 10 22:21:48 2019 +0200 patch 8.1.1837: popup test fails if clipboard is supported but not working Problem: Popup test fails if clipboard is supported but not working. Solution: Add the "clipboard_working" feature. Also use Check commands instead of "if" and "throw". And remove stray ch_logfile().
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Aug 2019 22:30:05 +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