aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthew Malcomson <hardenedapple@gmail.com>2017-06-01 09:20:56 +0100
committerMatthew Malcomson <hardenedapple@gmail.com>2018-03-14 10:39:14 +0000
commitcc58ec9a801510fe77edb34e02b0635c4f24f924 (patch)
treec1fd9741bbacac41d3d7ff829700470f6a4c68fc /test
parent3b304fc04ac0ac7ffe24ba4b83fc0d0ba4b80cfd (diff)
downloadrneovim-cc58ec9a801510fe77edb34e02b0635c4f24f924.tar.gz
rneovim-cc58ec9a801510fe77edb34e02b0635c4f24f924.tar.bz2
rneovim-cc58ec9a801510fe77edb34e02b0635c4f24f924.zip
Update documentation
Update vim_diff.txt with :lmap differences, update documentation on 'keymap', and add tests. The tests added are to demonstrate the behaviour specified in the documentation of :loadkeymap.
Diffstat (limited to 'test')
-rw-r--r--test/functional/options/keymap_spec.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/options/keymap_spec.lua b/test/functional/options/keymap_spec.lua
index 43fd1eb990..7f6d623dc7 100644
--- a/test/functional/options/keymap_spec.lua
+++ b/test/functional/options/keymap_spec.lua
@@ -215,4 +215,19 @@ describe("'keymap' / :lmap", function()
feed('il')
expect('aalllaaa')
end)
+ it('does not cause recursive mappings', function()
+ command('lmap a l')
+ feed('qaila<esc>q')
+ expect('allllaaa')
+ feed('u@a')
+ expect('allllaaa')
+ end)
+ it('can handle multicharacter mappings', function()
+ command("lmap 'a x")
+ command("lmap '' '")
+ feed("qai'a''a<esc>q")
+ expect("x'alllaaa")
+ feed('u@a')
+ expect("x'alllaaa")
+ end)
end)