diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-04-26 11:35:05 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-26 11:38:58 +0800 |
| commit | 519e4c44720be9b0c8584cb53a902bc1e5bfe3a3 (patch) | |
| tree | c22f82a0c739a99729d3d07a2af228b31dacaf4e /test/functional/editor | |
| parent | 5d159a7faad913852c65c81dcc976cf4be902fc1 (diff) | |
| download | rneovim-519e4c44720be9b0c8584cb53a902bc1e5bfe3a3.tar.gz rneovim-519e4c44720be9b0c8584cb53a902bc1e5bfe3a3.tar.bz2 rneovim-519e4c44720be9b0c8584cb53a902bc1e5bfe3a3.zip | |
test: correct order of arguments to eq() and neq()
Diffstat (limited to 'test/functional/editor')
| -rw-r--r-- | test/functional/editor/langmap_spec.lua | 28 | ||||
| -rw-r--r-- | test/functional/editor/macro_spec.lua | 8 |
2 files changed, 18 insertions, 18 deletions
diff --git a/test/functional/editor/langmap_spec.lua b/test/functional/editor/langmap_spec.lua index e4349a22e7..af19f97a68 100644 --- a/test/functional/editor/langmap_spec.lua +++ b/test/functional/editor/langmap_spec.lua @@ -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') diff --git a/test/functional/editor/macro_spec.lua b/test/functional/editor/macro_spec.lua index d4cf6b28fd..53be7dcc62 100644 --- a/test/functional/editor/macro_spec.lua +++ b/test/functional/editor/macro_spec.lua @@ -17,20 +17,20 @@ describe('macros', function() it('can be recorded and replayed', function() feed('qiahello<esc>q') expect('hello') - eq(eval('@i'), 'ahello') + eq('ahello', eval('@i')) feed('@i') expect('hellohello') - eq(eval('@i'), 'ahello') + eq('ahello', eval('@i')) end) it('applies maps', function() command('imap x l') command('nmap l a') feed('qilxxx<esc>q') expect('lll') - eq(eval('@i'), 'lxxx') + eq('lxxx', eval('@i')) feed('@i') expect('llllll') - eq(eval('@i'), 'lxxx') + eq('lxxx', eval('@i')) end) it('can be replayed with Q', function() |