view src/testdir/test_feedkeys.vim @ 15113:ae25a1172514 v8.1.0567

patch 8.1.0567: error for NUL byte in ScreenLines goes unnoticed commit https://github.com/vim/vim/commit/4087bfd96d0d70791a1572ac4b40d5a655e2166b Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 7 13:26:39 2018 +0100 patch 8.1.0567: error for NUL byte in ScreenLines goes unnoticed Problem: Error for NUL byte in ScreenLines goes unnoticed. Solution: Add an internal error message.
author Bram Moolenaar <Bram@vim.org>
date Fri, 07 Dec 2018 13:30:08 +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