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