aboutsummaryrefslogtreecommitdiff
path: root/test/functional/options/keymap_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-07-18 19:37:18 +0000
committerJosh Rahm <rahm@google.com>2022-07-18 19:37:18 +0000
commit308e1940dcd64aa6c344c403d4f9e0dda58d9c5c (patch)
tree35fe43e01755e0f312650667004487a44d6b7941 /test/functional/options/keymap_spec.lua
parent96a00c7c588b2f38a2424aeeb4ea3581d370bf2d (diff)
parente8c94697bcbe23a5c7b07c292b90a6b70aadfa87 (diff)
downloadrneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.gz
rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.bz2
rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.zip
Merge remote-tracking branch 'upstream/master' into rahm
Diffstat (limited to 'test/functional/options/keymap_spec.lua')
-rw-r--r--test/functional/options/keymap_spec.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/functional/options/keymap_spec.lua b/test/functional/options/keymap_spec.lua
index 52a714f7a8..a814c35a39 100644
--- a/test/functional/options/keymap_spec.lua
+++ b/test/functional/options/keymap_spec.lua
@@ -120,9 +120,9 @@ describe("'keymap' / :lmap", function()
it("Can be toggled with <C-^> in insert mode", function()
feed('i<C-^>l<C-^>l<esc>')
expect('lalllaaa')
- eq(eval('&iminsert'), 1)
+ eq(1, eval('&iminsert'))
feed('i<C-^><esc>')
- eq(eval('&iminsert'), 0)
+ eq(0, eval('&iminsert'))
end)
end)
describe("'imsearch' option", function()
@@ -136,36 +136,36 @@ describe("'keymap' / :lmap", function()
expect('aaa')
end)
it("Can be toggled with C-^", function()
- eq(eval('&imsearch'), 1)
+ eq(1, eval('&imsearch'))
feed('/<C-^>lll<cr>3x')
expect('aaa')
- eq(eval('&imsearch'), 0)
+ eq(0, eval('&imsearch'))
feed('u0/<C-^>lll<cr>3x')
expect('lll')
- eq(eval('&imsearch'), 1)
+ eq(1, eval('&imsearch'))
end)
it("can follow 'iminsert'", function()
command('set imsearch=-1')
feed('/lll<cr>3x')
expect('lll')
- eq(eval('&imsearch'), -1)
- eq(eval('&iminsert'), 1)
+ eq(-1, eval('&imsearch'))
+ eq(1, eval('&iminsert'))
feed('u/<C-^>lll<cr>3x')
expect('aaa')
- eq(eval('&imsearch'), -1)
- eq(eval('&iminsert'), 0)
+ eq(-1, eval('&imsearch'))
+ eq(0, eval('&iminsert'))
end)
end)
it(":lmap not applied to macros", function()
command("call setreg('a', 'il')")
feed('@a')
expect('llllaaa')
- eq(call('getreg', 'a'), 'il')
+ eq('il', call('getreg', 'a'))
end)
it(":lmap applied to macro recording", function()
feed('qail<esc>q@a')
expect('aalllaaa')
- eq(call('getreg', 'a'), 'ia')
+ eq('ia', call('getreg', 'a'))
end)
it(":lmap not applied to mappings", function()
command('imap t l')