diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-02-11 19:59:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-11 19:59:37 +0100 |
commit | f389196a344591da2f6cc2a63f4953e34316f954 (patch) | |
tree | 8cce092c29f33ae109dcf61e12e822d84aa014c7 /test/functional/legacy/edit_spec.lua | |
parent | 2cfc1b055bba6bb0f7e263a69079c7f52303a78a (diff) | |
parent | f26a4d484b486019c90fc55af5e74e33de374bc4 (diff) | |
download | rneovim-f389196a344591da2f6cc2a63f4953e34316f954.tar.gz rneovim-f389196a344591da2f6cc2a63f4953e34316f954.tar.bz2 rneovim-f389196a344591da2f6cc2a63f4953e34316f954.zip |
Merge #7960 'vim patches'
Diffstat (limited to 'test/functional/legacy/edit_spec.lua')
-rw-r--r-- | test/functional/legacy/edit_spec.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/legacy/edit_spec.lua b/test/functional/legacy/edit_spec.lua new file mode 100644 index 0000000000..91d602924c --- /dev/null +++ b/test/functional/legacy/edit_spec.lua @@ -0,0 +1,25 @@ +-- Test for edit functions +-- See also: src/nvim/testdir/test_edit.vim + +local helpers = require('test.functional.helpers')(after_each) +local source = helpers.source +local eq, eval = helpers.eq, helpers.eval +local funcs = helpers.funcs +local clear = helpers.clear + +describe('edit', function() + before_each(clear) + + it('reset insertmode from i_ctrl-r_=', function() + source([=[ + call setline(1, ['abc']) + call cursor(1, 4) + call feedkeys(":set im\<cr>ZZZ\<c-r>=setbufvar(1,'&im', 0)\<cr>",'tnix') + ]=]) + eq({'abZZZc'}, funcs.getline(1,'$')) + eq({0, 1, 1, 0}, funcs.getpos('.')) + eq(0, eval('&im')) + end) + +end) + |