view src/testdir/test_feedkeys.vim @ 19530:48e71f948360 v8.2.0322

patch 8.2.0322: Vim9: error checks not tested Commit: https://github.com/vim/vim/commit/b35efa5ed040162f5c988c71dfc1159045e47585 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 26 20:15:18 2020 +0100 patch 8.2.0322: Vim9: error checks not tested Problem: Vim9: error checks not tested. Solution: Add more test cases. Avoid error for function loaded later.
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 Feb 2020 20:30:09 +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