blob: 38b2f9f6877a3a662ea0581887d70f2d0bc28d56 [file] [log] [blame]
Bram Moolenaar74c5bbf2016-03-10 22:19:53 +01001" Test feedkeys() function.
2
3func Test_feedkeys_x_with_empty_string()
4 new
5 call feedkeys("ifoo\<Esc>")
6 call assert_equal('', getline('.'))
7 call feedkeys('', 'x')
8 call assert_equal('foo', getline('.'))
Bram Moolenaar9bd547a2016-04-01 21:00:48 +02009
10 " check it goes back to normal mode immediately.
11 call feedkeys('i', 'x')
12 call assert_equal('foo', getline('.'))
Bram Moolenaar74c5bbf2016-03-10 22:19:53 +010013 quit!
14endfunc
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +020015
16" vim: shiftwidth=2 sts=2 expandtab