mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
feat(lua): make =expr print result of expr
This commit is contained in:
@@ -141,6 +141,15 @@ describe(':lua command', function()
|
||||
{4:Press ENTER or type command to continue}^ |
|
||||
]]}
|
||||
end)
|
||||
|
||||
it('Can print results of =expr', function()
|
||||
helpers.exec_lua("x = 5")
|
||||
eq("5", helpers.exec_capture(':lua =x'))
|
||||
helpers.exec_lua("function x() return 'hello' end")
|
||||
eq([["hello"]], helpers.exec_capture(':lua = x()'))
|
||||
helpers.exec_lua("x = {a = 1, b = 2}")
|
||||
eq("{\n a = 1,\n b = 2\n}", helpers.exec_capture(':lua =x'))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe(':luado command', function()
|
||||
|
Reference in New Issue
Block a user