mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
test: correct order of arguments to eq() and neq()
This commit is contained in:
@@ -30,7 +30,7 @@ describe("'langmap'", function()
|
||||
command('nmapclear')
|
||||
end)
|
||||
it("'langnoremap' is by default ON", function()
|
||||
eq(eval('&langnoremap'), 1)
|
||||
eq(1, eval('&langnoremap'))
|
||||
end)
|
||||
it("Results of maps are not converted when 'langnoremap' ON.",
|
||||
function()
|
||||
@@ -71,19 +71,19 @@ describe("'langmap'", function()
|
||||
feed('<C-w>s')
|
||||
local origwin = curwin()
|
||||
feed('<C-w>i')
|
||||
neq(curwin(), origwin)
|
||||
neq(origwin, curwin())
|
||||
-- Works when setting a mark
|
||||
feed('yy3p3gg0mwgg0mi')
|
||||
eq(call('getpos', "'i"), {0, 3, 1, 0})
|
||||
eq(call('getpos', "'w"), {0, 1, 1, 0})
|
||||
eq({0, 3, 1, 0}, call('getpos', "'i"))
|
||||
eq({0, 1, 1, 0}, call('getpos', "'w"))
|
||||
feed('3dd')
|
||||
-- Works when moving to a mark
|
||||
feed("'i")
|
||||
eq(call('getpos', '.'), {0, 1, 1, 0})
|
||||
eq({0, 1, 1, 0}, call('getpos', '.'))
|
||||
-- Works when selecting a register
|
||||
feed('qillqqwhhq')
|
||||
eq(eval('@i'), 'hh')
|
||||
eq(eval('@w'), 'll')
|
||||
eq('hh', eval('@i'))
|
||||
eq('ll', eval('@w'))
|
||||
feed('a<C-r>i<esc>')
|
||||
expect('illii www')
|
||||
feed('"ip')
|
||||
@@ -107,7 +107,7 @@ describe("'langmap'", function()
|
||||
expect('wwi www')
|
||||
feed('u@a')
|
||||
expect('wwi www')
|
||||
eq(eval('@a'), ':s/i/w/gc\ryyn')
|
||||
eq(':s/i/w/gc\ryyn', eval('@a'))
|
||||
end)
|
||||
it('insert-mode CTRL-G', function()
|
||||
command('set langmap=jk,kj')
|
||||
@@ -127,7 +127,7 @@ describe("'langmap'", function()
|
||||
helhellolo
|
||||
helxlo
|
||||
hello]])
|
||||
eq(eval('@a'), 'gg3|ahellojx')
|
||||
eq('gg3|ahellojx', eval('@a'))
|
||||
end)
|
||||
it('command-line CTRL-\\', function()
|
||||
command('set langmap=en,ne')
|
||||
@@ -145,8 +145,8 @@ describe("'langmap'", function()
|
||||
set langmap=ij,ji
|
||||
]])
|
||||
feed(':let <C-R>i=1<CR>')
|
||||
eq(eval('i_value'), 1)
|
||||
eq(eval('j_value'), 0)
|
||||
eq(1, eval('i_value'))
|
||||
eq(0, eval('j_value'))
|
||||
end)
|
||||
-- it('-- More -- prompt', function()
|
||||
-- -- The 'b' 'j' 'd' 'f' commands at the -- More -- prompt
|
||||
@@ -186,17 +186,17 @@ describe("'langmap'", function()
|
||||
nnoremap x :call Map()<CR>
|
||||
]])
|
||||
feed('x1<CR>')
|
||||
eq(eval('gotten_one'), 1)
|
||||
eq(1, eval('gotten_one'))
|
||||
command('let g:gotten_one = 0')
|
||||
feed_command('call Map()')
|
||||
feed('1<CR>')
|
||||
eq(eval('gotten_one'), 1)
|
||||
eq(1, eval('gotten_one'))
|
||||
end)
|
||||
end)
|
||||
it('conversions are not applied during setreg()',
|
||||
function()
|
||||
call('setreg', 'i', 'ww')
|
||||
eq(eval('@i'), 'ww')
|
||||
eq('ww', eval('@i'))
|
||||
end)
|
||||
it('conversions not applied in insert mode', function()
|
||||
feed('aiiiwww')
|
||||
|
||||
Reference in New Issue
Block a user