view src/testdir/test_feedkeys.vim @ 23158:59635213999a v8.2.2125

patch 8.2.2125: Vim9: leaking memory Commit: https://github.com/vim/vim/commit/8f1bf2ef785e48a4ca08e014b7713fdee2824631 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 10 20:21:24 2020 +0100 patch 8.2.2125: Vim9: leaking memory Problem: Vim9: leaking memory. Solution: Free the saved 'cpo' value.
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Dec 2020 20:30:04 +0100
parents 08940efa6b4e
children e06cbcf4b94b
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

" vim: shiftwidth=2 sts=2 expandtab