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/api | |
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/api')
-rw-r--r-- | test/functional/api/autocmd_spec.lua | 10 | ||||
-rw-r--r-- | test/functional/api/proc_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/api/vim_spec.lua | 10 |
3 files changed, 13 insertions, 13 deletions
diff --git a/test/functional/api/autocmd_spec.lua b/test/functional/api/autocmd_spec.lua index 377b4fecf0..a30af63ba1 100644 --- a/test/functional/api/autocmd_spec.lua +++ b/test/functional/api/autocmd_spec.lua @@ -727,7 +727,7 @@ describe('autocmd api', function() set_ft("txt") set_ft("python") - eq(get_executed_count(), 2) + eq(2, get_executed_count()) end) it('works getting called multiple times', function() @@ -736,7 +736,7 @@ describe('autocmd api', function() set_ft() set_ft() - eq(get_executed_count(), 3) + eq(3, get_executed_count()) end) it('handles ++once', function() @@ -746,7 +746,7 @@ describe('autocmd api', function() set_ft('txt') set_ft('help') - eq(get_executed_count(), 1) + eq(1, get_executed_count()) end) it('errors on unexpected keys', function() @@ -874,7 +874,7 @@ describe('autocmd api', function() set_ft("txt") set_ft("python") - eq(get_executed_count(), 1) + eq(1, get_executed_count()) end) it('autocmds can be registered multiple times.', function() @@ -888,7 +888,7 @@ describe('autocmd api', function() set_ft("txt") set_ft("python") - eq(get_executed_count(), 3 * 2) + eq(3 * 2, get_executed_count()) end) it('can be deleted', function() diff --git a/test/functional/api/proc_spec.lua b/test/functional/api/proc_spec.lua index d828bdf948..0fbf58a8e7 100644 --- a/test/functional/api/proc_spec.lua +++ b/test/functional/api/proc_spec.lua @@ -63,9 +63,9 @@ describe('API', function() local pid = funcs.getpid() local pinfo = request('nvim_get_proc', pid) eq((iswin() and 'nvim.exe' or 'nvim'), pinfo.name) - eq(pinfo.pid, pid) - eq(type(pinfo.ppid), 'number') - neq(pinfo.ppid, pid) + eq(pid, pinfo.pid) + eq('number', type(pinfo.ppid)) + neq(pid, pinfo.ppid) end) it('validates input', function() diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 04b79a7157..f4b1a7fd59 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -122,9 +122,9 @@ describe('API', function() -- Functions nvim('exec', 'function Foo()\ncall setline(1,["xxx"])\nendfunction', false) - eq(nvim('get_current_line'), '') + eq('', nvim('get_current_line')) nvim('exec', 'call Foo()', false) - eq(nvim('get_current_line'), 'xxx') + eq('xxx', nvim('get_current_line')) -- Autocmds nvim('exec','autocmd BufAdd * :let x1 = "Hello"', false) @@ -1841,10 +1841,10 @@ describe('API', function() -- spin the loop a bit helpers.run(nil, nil, on_setup) - eq(nvim('get_var', 'x1'), '…') + eq('…', nvim('get_var', 'x1')) -- Because of the double escaping this is neq - neq(nvim('get_var', 'x2'), '…') - eq(nvim('get_var', 'x3'), '…') + neq('…', nvim('get_var', 'x2')) + eq('…', nvim('get_var', 'x3')) end) end) |