view src/testdir/test_feedkeys.vim @ 18812:d34ec6fe207d v8.1.2394

patch 8.1.2394: using old C style comments Commit: https://github.com/vim/vim/commit/63d9e730f726341bf41ee4f4b829253cb9879110 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 5 21:10:38 2019 +0100 patch 8.1.2394: using old C style comments Problem: Using old C style comments. Solution: Use // comments where appropriate.
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 Dec 2019 21:15:04 +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