aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/mapping_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/mapping_spec.lua')
-rw-r--r--test/functional/legacy/mapping_spec.lua28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/functional/legacy/mapping_spec.lua b/test/functional/legacy/mapping_spec.lua
index 899f7423d0..4d377904f9 100644
--- a/test/functional/legacy/mapping_spec.lua
+++ b/test/functional/legacy/mapping_spec.lua
@@ -5,7 +5,7 @@ local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect
describe('mapping', function()
- setup(clear)
+ before_each(clear)
it('is working', function()
insert([[
@@ -44,4 +44,30 @@ describe('mapping', function()
+
+]])
end)
+
+ it('i_CTRL-G_U', function()
+ -- <c-g>U<cursor> works only within a single line
+ execute('imapclear')
+ execute('imap ( ()<c-g>U<left>')
+ feed('G2o<esc>ki<cr>Test1: text with a (here some more text<esc>k.')
+ -- test undo
+ feed('G2o<esc>ki<cr>Test2: text wit a (here some more text [und undo]<c-g>u<esc>k.u')
+ execute('imapclear')
+ execute('set whichwrap=<,>,[,]')
+ feed('G3o<esc>2k')
+ execute([[:exe ":norm! iTest3: text with a (parenthesis here\<C-G>U\<Right>new line here\<esc>\<up>\<up>."]])
+
+ expect([[
+
+
+ Test1: text with a (here some more text)
+ Test1: text with a (here some more text)
+
+
+ Test2: text wit a (here some more text [und undo])
+ new line here
+ Test3: text with a (parenthesis here
+ new line here
+ ]])
+ end)
end)