view src/testdir/test_feedkeys.vim @ 24486:5e0db87e5184 v8.2.2783

patch 8.2.2783: duplicate code for setting byte in blob, blob test may fail Commit: https://github.com/vim/vim/commit/e8209b91b9974da95899b51dba4058b411d04d5b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 18 16:08:52 2021 +0200 patch 8.2.2783: duplicate code for setting byte in blob, blob test may fail Problem: Duplicate code for setting byte in blob, blob test may fail. Solution: Call blob_set_append(). Test sort failure with "N".
author Bram Moolenaar <Bram@vim.org>
date Sun, 18 Apr 2021 16:15:04 +0200
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