view src/testdir/test_feedkeys.vim @ 22902:1bde09eef44a v8.2.1998

patch 8.2.1998: terminal Cmd test sometimes fails to close popup Commit: https://github.com/vim/vim/commit/27f4f6baeeb25e1597a7827f4a509ecf2eb8e6e2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 16 21:02:28 2020 +0100 patch 8.2.1998: terminal Cmd test sometimes fails to close popup Problem: Terminal Cmd test sometimes fails to close popup. Solution: Add "term_finish" option.
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Nov 2020 21:15:03 +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