mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
fix(lua): always use vim.inspect() for :lua= (#32715)
This commit is contained in:
@@ -173,8 +173,13 @@ describe(':lua', function()
|
||||
exec_lua('x = 5')
|
||||
eq('5', exec_capture(':lua =x'))
|
||||
eq('5', exec_capture('=x'))
|
||||
exec_lua('x = "5"')
|
||||
eq('"5"', exec_capture(':lua =x'))
|
||||
eq('"5"', exec_capture('=x'))
|
||||
exec_lua("function x() return 'hello' end")
|
||||
eq('hello', exec_capture(':lua = x()'))
|
||||
eq('"hello"', exec_capture(':lua = x()'))
|
||||
exec_lua("function x() return 'hello ' end")
|
||||
eq('"hello "', exec_capture(':lua = x()'))
|
||||
exec_lua('x = {a = 1, b = 2}')
|
||||
eq('{\n a = 1,\n b = 2\n}', exec_capture(':lua =x'))
|
||||
exec_lua(function()
|
||||
@@ -189,14 +194,14 @@ describe(':lua', function()
|
||||
eq(
|
||||
dedent [[
|
||||
true
|
||||
Return value]],
|
||||
"Return value"]],
|
||||
exec_capture(':lua =x(true)')
|
||||
)
|
||||
eq(
|
||||
dedent [[
|
||||
false
|
||||
nil
|
||||
Error message]],
|
||||
"Error message"]],
|
||||
exec_capture('=x(false)')
|
||||
)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user