aboutsummaryrefslogtreecommitdiff
path: root/test/functional/options/keymap_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-26 11:35:05 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-26 11:38:58 +0800
commit519e4c44720be9b0c8584cb53a902bc1e5bfe3a3 (patch)
treec22f82a0c739a99729d3d07a2af228b31dacaf4e /test/functional/options/keymap_spec.lua
parent5d159a7faad913852c65c81dcc976cf4be902fc1 (diff)
downloadrneovim-519e4c44720be9b0c8584cb53a902bc1e5bfe3a3.tar.gz
rneovim-519e4c44720be9b0c8584cb53a902bc1e5bfe3a3.tar.bz2
rneovim-519e4c44720be9b0c8584cb53a902bc1e5bfe3a3.zip
test: correct order of arguments to eq() and neq()
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')