mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 10:01:49 +00:00
test: correct order of arguments to eq() and neq()
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user