view src/testdir/test_feedkeys.vim @ 19987:9cbe7ba51ce5 v8.2.0549

patch 8.2.0549: user systemd files not recognized Commit: https://github.com/vim/vim/commit/3b922f11380c7dbf94ee45bc09d688b772d9707f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 12 12:54:52 2020 +0200 patch 8.2.0549: user systemd files not recognized Problem: User systemd files not recognized. Solution: Add filetype patterns. (Kevin Locke, closes https://github.com/vim/vim/issues/5914)
author Bram Moolenaar <Bram@vim.org>
date Sun, 12 Apr 2020 13:00:07 +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