aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-01-20 04:53:39 +0800
committerGitHub <noreply@github.com>2022-01-19 13:53:39 -0700
commit431915fe6af4e176a84a60c95ad7aa9d36b71e50 (patch)
tree54c6973360946631ceebad38830328ae493cb047
parent96aa7dd09779d2f0c52cb4fbe5cc785331a7fbd0 (diff)
downloadrneovim-431915fe6af4e176a84a60c95ad7aa9d36b71e50.tar.gz
rneovim-431915fe6af4e176a84a60c95ad7aa9d36b71e50.tar.bz2
rneovim-431915fe6af4e176a84a60c95ad7aa9d36b71e50.zip
test(put_spec): correctly order parameters to eq() (#17134)
The first parameter to eq() should be the expected value, and the second parameter should be the actual value.
-rw-r--r--test/functional/editor/put_spec.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/functional/editor/put_spec.lua b/test/functional/editor/put_spec.lua
index 26967ecbba..fdda2be131 100644
--- a/test/functional/editor/put_spec.lua
+++ b/test/functional/editor/put_spec.lua
@@ -64,7 +64,7 @@ describe('put command', function()
-- one place to the right (unless we were at the end of the
-- line when we pasted).
if not (exception_table.undo_position and after_undo) then
- eq(funcs.getcurpos(), init_cursorpos)
+ eq(init_cursorpos, funcs.getcurpos())
end
end
@@ -86,7 +86,7 @@ describe('put command', function()
-- If we paste the ". register with a count we can't avoid
-- changing this register, hence avoid this check.
if not test.exception_table.dot_reg_changed then
- eq(funcs.getreg('.'), orig_dotstr)
+ eq(orig_dotstr, funcs.getreg('.'))
end
-- Doing something, undoing it, and then redoing it should
@@ -507,9 +507,9 @@ describe('put command', function()
return function(exception_table, after_redo)
test_expect(exception_table, after_redo)
if selection_string then
- eq(getreg('"'), selection_string)
+ eq(selection_string, getreg('"'))
else
- eq(getreg('"'), 'test_string"')
+ eq('test_string"', getreg('"'))
end
end
end
@@ -714,7 +714,7 @@ describe('put command', function()
expect_base, conversion_table)
return function(exception_table, after_redo)
test_expect(exception_table, after_redo)
- eq(getreg('"'), 'Line of words 1\n')
+ eq('Line of words 1\n', getreg('"'))
end
end
local base_expect_string = [[
@@ -748,7 +748,7 @@ describe('put command', function()
end, expect_base, conversion_table)
return function(e,c)
test_expect(e,c)
- eq(getreg('"'), 'Lin\nLin')
+ eq('Lin\nLin', getreg('"'))
end
end
@@ -800,9 +800,9 @@ describe('put command', function()
feed('u')
-- Have to use feed('u') here to set curswant, because
-- ex_undo() doesn't do that.
- eq(funcs.getcurpos(), {0, 1, 1, 0, 1})
+ eq({0, 1, 1, 0, 1}, funcs.getcurpos())
feed('<C-r>')
- eq(funcs.getcurpos(), {0, 1, 1, 0, 1})
+ eq({0, 1, 1, 0, 1}, funcs.getcurpos())
end
end