view src/testdir/test_feedkeys.vim @ 13266:d73ebdbd8e35 v8.0.1507

patch 8.0.1507: timer test is a bit flaky commit https://github.com/vim/vim/commit/bfbea567d89fdaa08ed987fd80daa53a6ce399d1 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 12 21:31:35 2018 +0100 patch 8.0.1507: timer test is a bit flaky Problem: Timer test is a bit flaky. Solution: Add it to the list of flaky tests.
author Christian Brabandt <cb@256bit.org>
date Mon, 12 Feb 2018 21:45:05 +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