view src/testdir/test_feedkeys.vim @ 19818:c1c88b333481 v8.2.0465

patch 8.2.0465: Vim9: dead code and wrong return type Commit: https://github.com/vim/vim/commit/599c89c82fe3c85378e8077b4e589f0ee4218da2 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 28 14:53:20 2020 +0100 patch 8.2.0465: Vim9: dead code and wrong return type Problem: Vim9: dead code and wrong return type. Solution: Remove dead code. Fix return type. Add more tests.
author Bram Moolenaar <Bram@vim.org>
date Sat, 28 Mar 2020 15:00:10 +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