mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
test(lua): tbl_deep_extend "after second argument" #30297
This commit is contained in:
parent
3d1110674e
commit
5ddf2ab768
@ -1079,34 +1079,21 @@ describe('lua stdlib', function()
|
||||
return vim.deep_equal(c, { sub = { [1] = 'a', b = 'a' } })
|
||||
]]))
|
||||
|
||||
matches(
|
||||
'invalid "behavior": nil',
|
||||
pcall_err(
|
||||
exec_lua,
|
||||
[[
|
||||
return vim.tbl_deep_extend()
|
||||
]]
|
||||
)
|
||||
)
|
||||
matches('invalid "behavior": nil', pcall_err(exec_lua, [[return vim.tbl_deep_extend()]]))
|
||||
|
||||
matches(
|
||||
'wrong number of arguments %(given 1, expected at least 3%)',
|
||||
pcall_err(
|
||||
exec_lua,
|
||||
[[
|
||||
return vim.tbl_deep_extend("keep")
|
||||
]]
|
||||
)
|
||||
pcall_err(exec_lua, [[return vim.tbl_deep_extend("keep")]])
|
||||
)
|
||||
|
||||
matches(
|
||||
'wrong number of arguments %(given 2, expected at least 3%)',
|
||||
pcall_err(
|
||||
exec_lua,
|
||||
[[
|
||||
return vim.tbl_deep_extend("keep", {})
|
||||
]]
|
||||
)
|
||||
pcall_err(exec_lua, [[return vim.tbl_deep_extend("keep", {})]])
|
||||
)
|
||||
|
||||
matches(
|
||||
'after the second argument%: expected table, got number',
|
||||
pcall_err(exec_lua, [[return vim.tbl_deep_extend("keep", {}, 42)]])
|
||||
)
|
||||
end)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user