view src/testdir/test_feedkeys.vim @ 17831:4ab97fdf7ff7 v8.1.1912

patch 8.1.1912: more functions can be used as methods Commit: https://github.com/vim/vim/commit/570497ac409ad448574bb6210cb9c6e573483759 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 22 22:55:13 2019 +0200 patch 8.1.1912: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make channel and job functions usable as a method.
author Bram Moolenaar <Bram@vim.org>
date Thu, 22 Aug 2019 23:00: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