Mercurial > vim
view src/testdir/test_feedkeys.vim @ 27359:e5c83812d173
Added tag v8.2.4207 for changeset 609a8ff1a5d27910c9a4abdbfdf1cfb9b8c2a0ef
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 24 Jan 2022 19:45:03 +0100 |
parents | e06cbcf4b94b |
children | 53c608c7ea9e |
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 func Test_feedkeys_with_abbreviation() new inoreabbrev trigger value call feedkeys("atrigger ", 'x') call feedkeys("atrigger ", 'x') call assert_equal('value value ', getline(1)) bwipe! iunabbrev trigger endfunc " vim: shiftwidth=2 sts=2 expandtab