diff options
Diffstat (limited to 'src/testdir/test_feedkeys.vim')
-rw-r--r-- | src/testdir/test_feedkeys.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_feedkeys.vim b/src/testdir/test_feedkeys.vim new file mode 100644 index 0000000..38b2f9f --- /dev/null +++ b/src/testdir/test_feedkeys.vim @@ -0,0 +1,16 @@ +" 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 |